Minor: add regression test for KT-41806

This commit is contained in:
Pavel Kirpichenkov
2020-09-14 18:17:11 +03:00
parent 2fad935ce2
commit b102042dd8
5 changed files with 46 additions and 0 deletions
@@ -28553,6 +28553,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
runTest("compiler/testData/codegen/box/regressions/kt4142.kt");
}
@TestMetadata("kt41806.kt")
public void testKt41806() throws Exception {
runTest("compiler/testData/codegen/box/regressions/kt41806.kt");
}
@TestMetadata("kt4259.kt")
public void testKt4259() throws Exception {
runTest("compiler/testData/codegen/box/regressions/kt4259.kt");
+26
View File
@@ -0,0 +1,26 @@
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// IGNORE_BACKEND_FIR: JVM_IR
open class A {
fun Foo() {
print("Fop")
}
}
class B() : A()
class C() : A()
fun box(): String {
var test : A = B()
println((test as B).toString())
listOf(1,2 ,3).forEach { it ->
test = C()
}
test.Foo()
return "OK"
}
@@ -30319,6 +30319,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/regressions/kt4142.kt");
}
@TestMetadata("kt41806.kt")
public void testKt41806() throws Exception {
runTest("compiler/testData/codegen/box/regressions/kt41806.kt");
}
@TestMetadata("kt4259.kt")
public void testKt4259() throws Exception {
runTest("compiler/testData/codegen/box/regressions/kt4259.kt");
@@ -27953,6 +27953,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/regressions/kt4142.kt");
}
@TestMetadata("kt41806.kt")
public void testKt41806() throws Exception {
runTest("compiler/testData/codegen/box/regressions/kt41806.kt");
}
@TestMetadata("kt4259.kt")
public void testKt4259() throws Exception {
runTest("compiler/testData/codegen/box/regressions/kt4259.kt");
@@ -28553,6 +28553,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/regressions/kt4142.kt");
}
@TestMetadata("kt41806.kt")
public void testKt41806() throws Exception {
runTest("compiler/testData/codegen/box/regressions/kt41806.kt");
}
@TestMetadata("kt4259.kt")
public void testKt4259() throws Exception {
runTest("compiler/testData/codegen/box/regressions/kt4259.kt");