Test for obsolete KT-5448: VerifyError with mismatched stack types
#KT-5448 Obsolete
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
class A
|
||||
|
||||
class B(val items: Collection<A>)
|
||||
|
||||
class C {
|
||||
fun foo(p: Int) {
|
||||
when (p) {
|
||||
1 -> arrayListOf<Int>().add(1)
|
||||
}
|
||||
}
|
||||
|
||||
fun bar() = B(listOf<A>().map { it })
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
C().foo(1)
|
||||
if (C().bar().items.isNotEmpty()) return "fail"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+6
@@ -3607,6 +3607,12 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt5448.kt")
|
||||
public void testKt5448() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/when/kt5448.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("switchOptimizationDense.kt")
|
||||
public void testSwitchOptimizationDense() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/when/switchOptimizationDense.kt");
|
||||
|
||||
Reference in New Issue
Block a user