+2003-01-23 Miguel de Icaza <miguel@ximian.com>
+
+ * class.cs (MethodData.Define): It is wrong for an interface
+ implementation to be static in both cases: explicit and implicit.
+ We were only handling this in one case.
+
+ Improve the if situation there to not have negations.
+
+ * class.cs (Field.Define): Turns out that we do not need to check
+ the unsafe bit on field definition, only on usage. Remove the test.
+
2003-01-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* driver.cs: use assembly.Location instead of Codebase (the latest
// The "candidate" function has been flagged already
// but it wont get cleared
//
- if (!member.IsExplicitImpl){
+ if (member.IsExplicitImpl){
+ if ((modifiers & (Modifiers.PUBLIC | Modifiers.ABSTRACT | Modifiers.VIRTUAL)) != 0){
+ Modifiers.Error_InvalidModifier (Location, "public, virtual or abstract");
+ implementing = null;
+ }
+ } else {
//
// We already catch different accessibility settings
// so we just need to check that we are not private
//
if ((modifiers & Modifiers.PRIVATE) != 0)
implementing = null;
+ }
- //
- // Static is not allowed
- //
- if ((modifiers & Modifiers.STATIC) != 0)
- implementing = null;
- } else {
- if ((modifiers & (Modifiers.PUBLIC | Modifiers.ABSTRACT | Modifiers.VIRTUAL)) != 0){
- Modifiers.Error_InvalidModifier (Location, "public, virtual or abstract");
- implementing = null;
- }
+ //
+ // Static is not allowed
+ //
+ if ((modifiers & Modifiers.STATIC) != 0){
+ implementing = null;
+ Modifiers.Error_InvalidModifier (Location, "static");
}
}
return false;
}
- if (t.IsPointer && !UnsafeOK (parent))
- return false;
-
if (RootContext.WarningLevel > 1){
Type ptype = parent.TypeBuilder.BaseType;