Avoid to generate unecessary checkcast

StackValue already avoid to generate checkcast from a type or an
 array to java.lang.Object. Add a new case to avoid to generate a
 checkcast from an array to an array of java.lang.Object when arrays
 have the same dimensions.

 #KT-22714 Fixed
This commit is contained in:
Mikaël Peltier
2018-02-06 15:56:29 +01:00
committed by Mikhael Bogdanov
parent 9a9452f73a
commit 126afbb8ac
8 changed files with 67 additions and 1 deletions
@@ -782,6 +782,12 @@ public class BytecodeTextTestGenerated extends AbstractBytecodeTextTest {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/checkcast/kt15411.kt");
doTest(fileName);
}
@TestMetadata("kt22714.kt")
public void testKt22714() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/bytecodeText/checkcast/kt22714.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/codegen/bytecodeText/coercionToUnitOptimization")