Test for KT-7338: Incorrect code is emitted for is-checks with array types, resulting in java.lang.VerifyError
#KT-7338 Obsolete
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
fun foo(x : Any): String {
|
||||
return if(x is Array<String>) x[0] else "fail"
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return foo(array("OK"))
|
||||
}
|
||||
+6
@@ -215,6 +215,12 @@ public class BlackBoxWithStdlibCodegenTestGenerated extends AbstractBlackBoxCode
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt7338.kt")
|
||||
public void testKt7338() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/arrays/kt7338.kt");
|
||||
doTestWithStdlib(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt945.kt")
|
||||
public void testKt945() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithStdlib/arrays/kt945.kt");
|
||||
|
||||
Reference in New Issue
Block a user