[FIR2IR] Always use property type if var
For destructing calls, the component type is used for the property type in all cases. However, this can result in runtime and/or compilation errors when the property is a var and changed, especially when the component is a primitive but the property type is nullable. Instead, only use the component type when the property is also a val. ^KT-64944 Fixed
This commit is contained in:
+6
@@ -38374,6 +38374,12 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo
|
||||
runTest("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reassignDestructured.kt")
|
||||
public void testReassignDestructured() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/primitiveTypes/reassignDestructured.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("stringEqualsHashCodeToString.kt")
|
||||
public void testStringEqualsHashCodeToString() throws Exception {
|
||||
|
||||
+6
@@ -38374,6 +38374,12 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi
|
||||
runTest("compiler/testData/codegen/box/primitiveTypes/rangeTo.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("reassignDestructured.kt")
|
||||
public void testReassignDestructured() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/primitiveTypes/reassignDestructured.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("stringEqualsHashCodeToString.kt")
|
||||
public void testStringEqualsHashCodeToString() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user