[FIR] Do not smartcast class delegation implemented properties
When a property is implemented via class delegation, it should be considered unstable for smart-casting. This is because it is unknown what kind of stability the underlying class delegate property has. It could be a stable property, or it could be implemented via a custom getter and unstable. ^KT-57417 Fixed
This commit is contained in:
+6
@@ -34635,6 +34635,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInlineModifiedBefore.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classDelegation.kt")
|
||||
public void testClassDelegation() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/classDelegation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("doWhileWithBreak.kt")
|
||||
public void testDoWhileWithBreak() throws Exception {
|
||||
|
||||
+6
@@ -34761,6 +34761,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/capturedInlineModifiedBefore.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("classDelegation.kt")
|
||||
public void testClassDelegation() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/smartCasts/varnotnull/classDelegation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("doWhileWithBreak.kt")
|
||||
public void testDoWhileWithBreak() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user