Fixed code generator bug that could cause AbstractMethodError to be thrown when subclassing a .NET type that has an explicit interface method implementation.

This commit is contained in:
jfrijters 2007-08-29 06:23:14 +00:00
Родитель 41d63bda7c
Коммит 477adb3b33
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -4735,7 +4735,7 @@ namespace IKVM.Internal
foreach(MethodWrapper mw in parent.GetMethods())
{
MethodInfo mi = mw.GetMethod() as MethodInfo;
if(mi != null && mi.IsAbstract && wrapper.GetMethodWrapper(mw.Name, mw.Signature, true) == mw)
if(mi != null && mi.IsAbstract && !mi.DeclaringType.IsInterface && wrapper.GetMethodWrapper(mw.Name, mw.Signature, true) == mw)
{
// NOTE in Sun's JRE 1.4.1 this method cannot be overridden by subclasses,
// but I think this is a bug, so we'll support it anyway.