[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
@@ -30647,6 +30647,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
|
||||
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
@@ -31345,6 +31345,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
|
||||
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
@@ -29373,6 +29373,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
|
||||
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
@@ -30060,6 +30060,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
|
||||
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