2006-12-19 Marek Safar <marek.safar@gmail.com>
authorMarek Safar <marek.safar@gmail.com>
Tue, 19 Dec 2006 22:19:24 +0000 (22:19 -0000)
committerMarek Safar <marek.safar@gmail.com>
Tue, 19 Dec 2006 22:19:24 +0000 (22:19 -0000)
* class.cs (GetClassBases): Write 5 times every day, will never use
FullName for error reporting.

* decl.cs (AsAccessible, CheckAccessLevel): Always unpack arrays first.

svn path=/trunk/mcs/; revision=69786

mcs/mcs/ChangeLog
mcs/mcs/class.cs
mcs/mcs/decl.cs

index ec1bc50432ab1cb8f7350e72177b259f953178d8..739903ed35dcbddee44789d17f3d6aeca214abfc 100644 (file)
@@ -1,3 +1,10 @@
+2006-12-19  Marek Safar  <marek.safar@gmail.com>
+
+       * class.cs (GetClassBases): Write 5 times every day, will never use
+       FullName for error reporting.
+
+       * decl.cs (AsAccessible, CheckAccessLevel): Always unpack arrays first.
+
 2006-12-19  Martin Baulig  <martin@ximian.com>
 
        * statement.cs (LocalInfo.EmitSymbolInfo): New public method; emit
index f24ed5da6e14fb87b1e1031e3d18d2b64c7735d7..3999f23bb372de0d931cc1fb7742223281ff48af 100644 (file)
@@ -1096,7 +1096,7 @@ namespace Mono.CSharp {
                                if (!iface.IsInterface) {
                                        if (Kind != Kind.Class) {
                                                // TODO: location of symbol related ....
-                                               Error_TypeInListIsNotInterface (Location, iface.FullName);
+                                               Error_TypeInListIsNotInterface (Location, iface.GetSignatureForError ());
                                        }
                                        else if (base_class != null)
                                                Report.Error (1721, Location, "`{0}': Classes cannot have multiple base classes (`{1}' and `{2}')",
index d80c920254bd86b401fc7664c2b89b66450c8870..ab80f02ed4bcc266f0a95de567ea25a1abaec29c 100644 (file)
@@ -853,11 +853,6 @@ namespace Mono.CSharp {
                                //        May also be null when resolving top-level attributes.
                                return true;
 
-                       if (TypeManager.IsGenericParameter (check_type))
-                               return true; // FIXME
-                       
-                       TypeAttributes check_attr = check_type.Attributes & TypeAttributes.VisibilityMask;
-
                        //
                        // Broken Microsoft runtime, return public for arrays, no matter what 
                        // the accessibility is for their underlying class, and they return 
@@ -866,6 +861,11 @@ namespace Mono.CSharp {
                        if (check_type.IsArray || check_type.IsPointer)
                                return CheckAccessLevel (TypeManager.GetElementType (check_type));
 
+                       if (TypeManager.IsGenericParameter(check_type))
+                               return true; // FIXME
+
+                       TypeAttributes check_attr = check_type.Attributes & TypeAttributes.VisibilityMask;
+
                        switch (check_attr){
                        case TypeAttributes.Public:
                                return true;
@@ -1002,9 +1002,6 @@ namespace Mono.CSharp {
                //
                public bool AsAccessible (Type p, int flags)
                {
-                       if (TypeManager.IsGenericParameter (p))
-                               return true; // FIXME
-
                        //
                        // 1) if M is private, its accessability is the same as this declspace.
                        // we already know that P is accessible to T before this method, so we
@@ -1016,7 +1013,10 @@ namespace Mono.CSharp {
                        
                        while (p.IsArray || p.IsPointer || p.IsByRef)
                                p = TypeManager.GetElementType (p);
-                       
+
+                       if (TypeManager.IsGenericParameter(p))
+                               return true; // FIXME
+
                        AccessLevel pAccess = TypeEffectiveAccessLevel (p);
                        AccessLevel mAccess = this.EffectiveAccessLevel &
                                GetAccessLevelFromModifiers (flags);