Flush
[mono.git] / mcs / gmcs / modifiers.cs
index 46bba1acb2166d9cc0417faf0289e8898e23f92e..52b2618df140741b7d4ee4865dfe7b05a3552c3f 100755 (executable)
@@ -69,6 +69,8 @@ namespace Mono.CSharp {
                                s = "extern"; break;
                        case Modifiers.VOLATILE:
                                s = "volatile"; break;
+                       case Modifiers.UNSAFE:
+                               s = "unsafe"; break;
                        }
 
                        return s;
@@ -110,7 +112,8 @@ namespace Mono.CSharp {
 
                        // If we do not have static constructors, static methods
                        // can be invoked without initializing the type.
-                       if (!caller.UserDefinedStaticConstructor)
+                       if (!caller.UserDefinedStaticConstructor &&
+                           !(caller is Interface))
                                t |= TypeAttributes.BeforeFieldInit;
                                
                        return t;
@@ -197,7 +200,7 @@ namespace Mono.CSharp {
                                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");
                                        }
                                }