FIR IDE: API to indicate delegated property
This commit is contained in:
committed by
Ilya Kirillov
parent
96fbbb6f69
commit
b52912162f
+2
@@ -101,6 +101,8 @@ internal class KtFirKotlinPropertySymbol(
|
||||
// NB: `field` in accessors indicates the property should have a backing field. To see that, though, we need BODY_RESOLVE.
|
||||
override val hasBackingField: Boolean get() = firRef.withFir(FirResolvePhase.BODY_RESOLVE) { it.hasBackingField }
|
||||
|
||||
override val isDelegatedProperty: Boolean get() = firRef.withFir { it.delegateFieldSymbol != null }
|
||||
|
||||
override val isLateInit: Boolean get() = firRef.withFir { it.isLateInit }
|
||||
|
||||
override val isConst: Boolean get() = firRef.withFir { it.isConst }
|
||||
|
||||
+6
@@ -78,6 +78,12 @@ public class FirSymbolByPsiTestGenerated extends AbstractFirSymbolByPsiTest {
|
||||
runTest("analysis/analysis-api/testData/symbols/symbolByPsi/classWithTypeParams.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("delegateField.kt")
|
||||
public void testDelegateField() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/symbols/symbolByPsi/delegateField.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("deprecated.kt")
|
||||
public void testDeprecated() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user