From 13e1fa6bb072e2914e639c0691e500d218c43900 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sat, 5 Sep 2009 16:15:37 +0000 Subject: [PATCH] Fixed IsAccessible for "protected internal" members. (forum-9974) git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@4887 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Project/Src/Implementations/AbstractEntity.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Implementations/AbstractEntity.cs b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Implementations/AbstractEntity.cs index ac92fffd08..9e700f4a93 100644 --- a/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Implementations/AbstractEntity.cs +++ b/src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Implementations/AbstractEntity.cs @@ -305,7 +305,10 @@ namespace ICSharpCode.SharpDevelop.Dom if (IsPublic) { return true; } else if (IsInternal) { - return callingClass != null && this.DeclaringType.ProjectContent.InternalsVisibleTo(callingClass.ProjectContent); + // members can be both internal and protected: in that case, we want to return true if it is visible + // through any of the modifiers + if (callingClass != null && this.DeclaringType.ProjectContent.InternalsVisibleTo(callingClass.ProjectContent)) + return true; } // protected or private: // search in callingClass and, if callingClass is a nested class, in its outer classes