Negative header ids should be valid
[mono.git] / mcs / mcs / module.cs
index 85d4ff42db57689574b6ceafb5da1f5e31a4f9f0..bf36e8f20e4c2695ebadda8638619e587c28c511 100644 (file)
@@ -36,13 +36,14 @@ namespace Mono.CSharp
                //
                // Compiler generated container for static data
                //
-               sealed class StaticDataContainer : CompilerGeneratedClass
+               sealed class StaticDataContainer : CompilerGeneratedContainer
                {
                        readonly Dictionary<int, Struct> size_types;
                        int fields;
 
                        public StaticDataContainer (ModuleContainer module)
-                               : base (module, new MemberName ("<PrivateImplementationDetails>" + module.builder.ModuleVersionId.ToString ("B"), Location.Null), Modifiers.STATIC)
+                               : base (module, new MemberName ("<PrivateImplementationDetails>" + module.builder.ModuleVersionId.ToString ("B"), Location.Null),
+                                       Modifiers.STATIC | Modifiers.INTERNAL)
                        {
                                size_types = new Dictionary<int, Struct> ();
                        }
@@ -428,7 +429,7 @@ namespace Mono.CSharp
 
                        base.EmitContainer ();
 
-                       if (Compiler.Report.Errors == 0)
+                       if (Compiler.Report.Errors == 0 && !Compiler.Settings.WriteMetadataOnly)
                                VerifyMembers ();
 
                        if (anonymous_types != null) {