A test for K-J-K inheritance with generics
This commit is contained in:
@@ -0,0 +1,17 @@
|
|||||||
|
// FILE: K1.kt
|
||||||
|
open class KFirst<T: java.io.Serializable>() {
|
||||||
|
fun foo(t: T): T = t
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: J1.java
|
||||||
|
public class J1 extends KFirst<Integer> {
|
||||||
|
void baz() {}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: K2.kt
|
||||||
|
class K2: J1() {
|
||||||
|
fun bar() {
|
||||||
|
foo(1)
|
||||||
|
baz()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2406,6 +2406,11 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage
|
|||||||
doTest("compiler/testData/diagnostics/tests/j+k/KJKInheritance.kt");
|
doTest("compiler/testData/diagnostics/tests/j+k/KJKInheritance.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("KJKInheritanceGeneric.kt")
|
||||||
|
public void testKJKInheritanceGeneric() throws Exception {
|
||||||
|
doTest("compiler/testData/diagnostics/tests/j+k/KJKInheritanceGeneric.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("kt1402.kt")
|
@TestMetadata("kt1402.kt")
|
||||||
public void testKt1402() throws Exception {
|
public void testKt1402() throws Exception {
|
||||||
doTest("compiler/testData/diagnostics/tests/j+k/kt1402.kt");
|
doTest("compiler/testData/diagnostics/tests/j+k/kt1402.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user