JVM: do not put public field access into a single expression block
It affects the `is IrGetField` check in TypeOperatorLowering.computeNotNullAssertionText, which leads to missing NPE messages when accessing backing fields of public properties. #KT-64615
This commit is contained in:
committed by
Space Team
parent
96b2f13397
commit
f01e633f8b
+5
@@ -26297,6 +26297,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/javaInterop/notNullAssertions/expressionAssertionMessages"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("backingField.kt")
|
||||
public void testBackingField() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/expressionAssertionMessages/backingField.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("field_after.kt")
|
||||
public void testField_after() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/javaInterop/notNullAssertions/expressionAssertionMessages/field_after.kt");
|
||||
|
||||
Reference in New Issue
Block a user