Browse Source

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
shortcuts
Daniel Grunwald 16 years ago
parent
commit
13e1fa6bb0
  1. 5
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Implementations/AbstractEntity.cs

5
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Implementations/AbstractEntity.cs

@ -305,7 +305,10 @@ namespace ICSharpCode.SharpDevelop.Dom
if (IsPublic) { if (IsPublic) {
return true; return true;
} else if (IsInternal) { } 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: // protected or private:
// search in callingClass and, if callingClass is a nested class, in its outer classes // search in callingClass and, if callingClass is a nested class, in its outer classes

Loading…
Cancel
Save