JVM IR: fix the type of IrGetField
The `irGetField` utility uses the field's own type as the type of the resulting expression. But the field's type does not make sense outside of the place of declaration of the field if it references a generic type parameter of the containing class. Using this non-sensical generic type led, for example, to an error in Ieee754 intrinsic (KT-48648). The type of the expression should be kept as is in JvmPropertiesLowering, i.e. taken from `expression` which the lowering is replacing with the field access. #KT-48648 Fixed
This commit is contained in:
+5
@@ -14588,6 +14588,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/ieee754/inline.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt48648_genericField.kt")
|
||||
public void testKt48648_genericField() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ieee754/kt48648_genericField.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lessDouble.kt")
|
||||
public void testLessDouble() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/ieee754/lessDouble.kt");
|
||||
|
||||
Reference in New Issue
Block a user