KT-60954 [Analysis API] Unwrap variable assignments in KtFirReferenceShortener

To get to the proper qualified expression, we need to unwrap the outer
`FirVariableAssignment` if we deal with the property access inside of
assignment expressions

^KT-60954 Fixed
This commit is contained in:
Roman Golyshev
2023-08-04 15:37:03 +02:00
committed by teamcity
parent 7151e6a41c
commit ab8726cff1
9 changed files with 108 additions and 1 deletions
@@ -430,6 +430,24 @@ public class FirStandaloneNormalAnalysisSourceModuleReferenceShortenerTestGenera
runTest("analysis/analysis-api/testData/components/referenceShortener/referenceShortener/variable2.kt");
}
@Test
@TestMetadata("variableAssignment.kt")
public void testVariableAssignment() throws Exception {
runTest("analysis/analysis-api/testData/components/referenceShortener/referenceShortener/variableAssignment.kt");
}
@Test
@TestMetadata("variableAssignment_plusAssignOperator.kt")
public void testVariableAssignment_plusAssignOperator() throws Exception {
runTest("analysis/analysis-api/testData/components/referenceShortener/referenceShortener/variableAssignment_plusAssignOperator.kt");
}
@Test
@TestMetadata("variableAssignment_plusOperator.kt")
public void testVariableAssignment_plusOperator() throws Exception {
runTest("analysis/analysis-api/testData/components/referenceShortener/referenceShortener/variableAssignment_plusOperator.kt");
}
@Nested
@TestMetadata("analysis/analysis-api/testData/components/referenceShortener/referenceShortener/nestedClasses")
@TestDataPath("$PROJECT_ROOT")