2007-02-06 Marek Safar <marek.safar@gmail.com>
[mono.git] / mcs / mcs / modifiers.cs
index a430171adb35f81487ea9acba885a7bca4ba749e..566a8f67604c4610070a1f149b398897ab8babdc 100644 (file)
@@ -28,6 +28,8 @@ namespace Mono.CSharp {
                public const int TOP       = 0x2000;
 
                public const int PROPERTY_CUSTOM = 0x4000; // Custom property modifier
+               public const int PARTIAL   = 0x20000;
+               public const int DEFAULT_ACCESS_MODIFER = 0x40000;
 
                //
                // We use this internally to flag that the method contains an iterator
@@ -127,19 +129,6 @@ namespace Mono.CSharp {
 
                        return t;
                }
-               
-               public static TypeAttributes TypeAttr (int mod_flags, TypeContainer caller)
-               {
-                       TypeAttributes t = TypeAttr (mod_flags, caller.IsTopLevel);
-
-                       // If we do not have static constructors, static methods
-                       // can be invoked without initializing the type.
-                       if (!caller.UserDefinedStaticConstructor &&
-                           (caller.Kind != Kind.Interface))
-                               t |= TypeAttributes.BeforeFieldInit;
-                               
-                       return t;
-               }
 
                public static FieldAttributes FieldAttr (int mod_flags)
                {
@@ -229,6 +218,8 @@ namespace Mono.CSharp {
                                //
                                if ((mod & Accessibility) == 0){
                                        mod |= def_access;
+                                       if (def_access != 0)
+                                               mod |= DEFAULT_ACCESS_MODIFER;
                                        return mod;
                                }