**** Merged r44071 from MCS ****
authorMartin Baulig <martin@novell.com>
Tue, 10 May 2005 23:09:29 +0000 (23:09 -0000)
committerMartin Baulig <martin@novell.com>
Tue, 10 May 2005 23:09:29 +0000 (23:09 -0000)
svn path=/trunk/mcs/; revision=44363

mcs/gmcs/ChangeLog
mcs/gmcs/decl.cs

index a047a9c150b2d17ff841bebf0c9f78ad9b896682..c6ffd3d6363892cfa0c3068d397095d3d2fc0ace 100644 (file)
@@ -55,9 +55,8 @@
 2005-05-05  Raja R Harinath  <rharinath@novell.com>
 
        Fix #74797.
-       * decl.cs (DeclSpace.FamilyAccessible): Delegate accessibility
-       check to surrounding class.  A nested class can access everything
-       accessible by its surrounding class.
+       * decl.cs (DeclSpace.FamilyAccessible): 
+       Use TypeManager.IsNestedFamilyAccessible.
 
        Fix reopened #64812.
        * typemanager.cs (Closure.Filter): Introduce checks for 'protected
index 2db6fb4928c124a8d281943f9a768c1e3695b7df..721897e380afdcc7b639ddff0ab17eac59252db2 100644 (file)
@@ -905,16 +905,7 @@ namespace Mono.CSharp {
                protected bool FamilyAccessible (Type tb, Type check_type)
                {
                        Type declaring = check_type.DeclaringType;
-                       if (tb == declaring || TypeManager.IsFamilyAccessible (tb, declaring))
-                               return true;
-
-                       if (NestedAccessible (tb, check_type))
-                               return true;
-
-                       if (Parent == null || Parent == RootContext.Tree.Types)
-                               return false;
-
-                       return Parent.FamilyAccessible (tb, check_type);
+                       return TypeManager.IsNestedFamilyAccessible (TypeBuilder, declaring);
                }
 
                // Access level of a type.