Browse Source

Fixed IList for types that do not implement IList, but their superclass does.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2930 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 18 years ago
parent
commit
d23a1be3b1
  1. 20
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugType.cs

20
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugType.cs

@ -164,7 +164,11 @@ namespace Debugger.MetaData @@ -164,7 +164,11 @@ namespace Debugger.MetaData
return inter;
}
}
return null;
if (BaseType != null) {
return BaseType.GetInterface(fullName);
} else {
return null;
}
}
/// <summary> Returns generics arguments for a type or an emtpy
@ -472,15 +476,15 @@ namespace Debugger.MetaData @@ -472,15 +476,15 @@ namespace Debugger.MetaData
/// <remarks> Returns false if the given type is same as the current type </remarks>
public bool IsSubclassOf(DebugType superType)
{
// Does this type implement the interface?
if (superType.IsInterface) {
foreach(DebugType inter in this.Interfaces) {
if (inter == superType) return true;
}
}
DebugType type = this.BaseType;
DebugType type = this;
while (type != null) {
if (type.Equals(superType)) return true;
if (superType.IsInterface) {
// Does this 'type' implement the interface?
foreach(DebugType inter in type.Interfaces) {
if (inter == superType) return true;
}
}
type = type.BaseType;
}
return false;

Loading…
Cancel
Save