regression test for KT-4281
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
abstract class C {
|
||||
fun test(x: Int) {
|
||||
if (x == 0) return
|
||||
if (this is D) {
|
||||
(this: D).test(x - 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class D: C()
|
||||
|
||||
fun box(): String {
|
||||
D().test(10)
|
||||
return "OK"
|
||||
}
|
||||
+6
@@ -6061,6 +6061,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt4281.kt")
|
||||
public void testKt4281() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt4281.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt4682.kt")
|
||||
public void testKt4682() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/kt4682.kt");
|
||||
|
||||
Reference in New Issue
Block a user