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. 14
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugType.cs

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

@ -164,8 +164,12 @@ namespace Debugger.MetaData @@ -164,8 +164,12 @@ namespace Debugger.MetaData
return inter;
}
}
if (BaseType != null) {
return BaseType.GetInterface(fullName);
} else {
return null;
}
}
/// <summary> Returns generics arguments for a type or an emtpy
/// array for non-generic types. </summary>
@ -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?
DebugType type = this;
while (type != null) {
if (type.Equals(superType)) return true;
if (superType.IsInterface) {
foreach(DebugType inter in this.Interfaces) {
// Does this 'type' implement the interface?
foreach(DebugType inter in type.Interfaces) {
if (inter == superType) return true;
}
}
DebugType type = this.BaseType;
while (type != null) {
if (type.Equals(superType)) return true;
type = type.BaseType;
}
return false;

Loading…
Cancel
Save