提交 6d2deaa7 编写于 作者: A Alex Tkachman

KT-1600: call to non-overriden generic method

上级 711e61cd
......@@ -491,6 +491,11 @@ public class JetTypeMapper {
return null;
final DeclarationDescriptor functionParent = functionDescriptor.getOriginal().getContainingDeclaration();
while(functionDescriptor.getKind()==CallableMemberDescriptor.Kind.FAKE_OVERRIDE) {
functionDescriptor = functionDescriptor.getOverriddenDescriptors().iterator().next();
}
JvmMethodSignature descriptor = mapSignature(functionDescriptor.getOriginal(), true, kind);
String owner;
String ownerForDefaultImpl;
......
abstract class Foo<T> {
fun hello(id: T) = "O$id"
}
class Bar: Foo<String>() {
}
fun box() = Bar().hello("K")
......@@ -75,4 +75,8 @@ public class ObjectGenTest extends CodegenTestCase {
public void testKt1186() throws Exception {
blackBoxFile("regressions/kt1186.kt");
}
public void testKt1600() throws Exception {
blackBoxFile("regressions/kt1600.kt");
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册