Browse Source

Fix IsTypeInInheritanceTree for classes differing only in numbers of type parameters.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@6318 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Daniel Grunwald 16 years ago
parent
commit
4139e71afa
  1. 7
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Implementations/DefaultClass.cs

7
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Implementations/DefaultClass.cs

@ -429,6 +429,10 @@ namespace ICSharpCode.SharpDevelop.Dom
public IEnumerable<IClass> ClassInheritanceTreeClassesOnly { public IEnumerable<IClass> ClassInheritanceTreeClassesOnly {
get { get {
IClass compoundClass = GetCompoundClass();
if (compoundClass != this)
return compoundClass.ClassInheritanceTreeClassesOnly;
// Notes: // Notes:
// the ClassInheritanceTree must work even if the following things happen: // the ClassInheritanceTree must work even if the following things happen:
// - cyclic inheritance // - cyclic inheritance
@ -568,7 +572,8 @@ namespace ICSharpCode.SharpDevelop.Dom
return false; return false;
} }
foreach (IClass baseClass in this.ClassInheritanceTree) { foreach (IClass baseClass in this.ClassInheritanceTree) {
if (possibleBaseClass.FullyQualifiedName == baseClass.FullyQualifiedName) if (possibleBaseClass.FullyQualifiedName == baseClass.FullyQualifiedName
&& possibleBaseClass.TypeParameters.Count == baseClass.TypeParameters.Count)
return true; return true;
} }
return false; return false;

Loading…
Cancel
Save