s = "extern"; break;
case Modifiers.VOLATILE:
s = "volatile"; break;
+ case Modifiers.UNSAFE:
+ s = "unsafe"; break;
}
return s;
// If we do not have static constructors, static methods
// can be invoked without initializing the type.
- if (!caller.UserDefinedStaticConstructor)
+ if (!caller.UserDefinedStaticConstructor &&
+ (caller.Kind != Kind.Interface))
t |= TypeAttributes.BeforeFieldInit;
return t;
if ((mod & Modifiers.UNSAFE) != 0){
if (!RootContext.Unsafe){
Report.Error (227, l,
- "Unsafe code requires the --unsafe command " +
+ "Unsafe code requires the -unsafe command " +
"line option to be specified");
}
}