diff --git a/compiler/testData/codegen/boxWithStdlib/arrays/kt7338.kt b/compiler/testData/codegen/boxWithStdlib/arrays/kt7338.kt new file mode 100644 index 00000000000..1762a9d516f --- /dev/null +++ b/compiler/testData/codegen/boxWithStdlib/arrays/kt7338.kt @@ -0,0 +1,7 @@ +fun foo(x : Any): String { + return if(x is Array) x[0] else "fail" +} + +fun box(): String { + return foo(array("OK")) +} \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxWithStdlibCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxWithStdlibCodegenTestGenerated.java index f1e5a011fcd..0b5b32da0c5 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxWithStdlibCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/generated/BlackBoxWithStdlibCodegenTestGenerated.java @@ -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");