test for already fixed KT-1976
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
class A {
|
||||||
|
public val f : ()->String = {"OK"}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
val a = A()
|
||||||
|
return a.f() // does not work: (in runtime) ClassCastException: A cannot be cast to jet.Function0
|
||||||
|
}
|
||||||
@@ -411,4 +411,9 @@ public class ClassGenTest extends CodegenTestCase {
|
|||||||
createEnvironmentWithMockJdkAndIdeaAnnotations(CompilerSpecialMode.JDK_HEADERS);
|
createEnvironmentWithMockJdkAndIdeaAnnotations(CompilerSpecialMode.JDK_HEADERS);
|
||||||
blackBoxFile("regressions/kt1726.kt");
|
blackBoxFile("regressions/kt1726.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testKt1976() throws Exception {
|
||||||
|
createEnvironmentWithMockJdkAndIdeaAnnotations(CompilerSpecialMode.JDK_HEADERS);
|
||||||
|
blackBoxFile("regressions/kt1976.kt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user