зеркало из https://github.com/mono/ikvm-fork.git
Bug fix. When enumerating virtual methods, we should only skip match actual base methods, not any method with the same signature.
This commit is contained in:
Родитель
d15c9e3590
Коммит
79e5757ad4
|
@ -801,7 +801,7 @@ namespace IKVM.Reflection
|
|||
{
|
||||
baseMethods = new List<MethodInfo>();
|
||||
}
|
||||
else if (FindMethod(baseMethods, mi.GetBaseDefinition()))
|
||||
else if (baseMethods.Contains(mi.GetBaseDefinition()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -815,18 +815,6 @@ namespace IKVM.Reflection
|
|||
return list.ToArray();
|
||||
}
|
||||
|
||||
private static bool FindMethod(List<MethodInfo> methods, MethodInfo method)
|
||||
{
|
||||
foreach (MethodInfo m in methods)
|
||||
{
|
||||
if (m.Name == method.Name && m.MethodSignature.Equals(method.MethodSignature))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public MethodInfo[] GetMethods()
|
||||
{
|
||||
return GetMethods(BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance);
|
||||
|
|
Загрузка…
Ссылка в новой задаче