Fix NPE caused by nullability checks optimizations

Mostly this commit replaces instances of original BasicValue from ASM
with ones of StrictBasicValue having strict equals implementation

Optimization issue was related to non-symmetric 'equals':
- NotNullBasicValue("java/lang/Object").equals(BasicValue("java/lang/Object")) == false
- BasicValue("java/lang/Object").equals(NotNullBasicValue("java/lang/Object")) == true

 #KT-14242 Fixed
This commit is contained in:
Denis Zharkov
2016-10-24 16:13:46 +03:00
parent 18f10860df
commit 3a197e8d7e
11 changed files with 122 additions and 37 deletions
@@ -13846,6 +13846,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
doTest(fileName);
}
@TestMetadata("hashCodeNPE.kt")
public void testHashCodeNPE() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/hashCodeNPE.kt");
doTest(fileName);
}
@TestMetadata("internalTopLevelOtherPackage.kt")
public void testInternalTopLevelOtherPackage() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/regressions/internalTopLevelOtherPackage.kt");