From: Martin Baulig Date: Tue, 10 May 2005 23:09:29 +0000 (-0000) Subject: **** Merged r44071 from MCS **** X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=94ac64f8d006dc76ea879fe5fa6ed4056155c133;p=mono.git **** Merged r44071 from MCS **** svn path=/trunk/mcs/; revision=44363 --- diff --git a/mcs/gmcs/ChangeLog b/mcs/gmcs/ChangeLog index a047a9c150b..c6ffd3d6363 100644 --- a/mcs/gmcs/ChangeLog +++ b/mcs/gmcs/ChangeLog @@ -55,9 +55,8 @@ 2005-05-05 Raja R Harinath 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 diff --git a/mcs/gmcs/decl.cs b/mcs/gmcs/decl.cs index 2db6fb4928c..721897e380a 100644 --- a/mcs/gmcs/decl.cs +++ b/mcs/gmcs/decl.cs @@ -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.