FIR DFA: exit delegate expression only after accessor completion

This commit fixes DFA problem (see test) when we accidentally try
to merge incoming flows from member property (val ... by cached ...) and
the following function. While completing lambda of buildList { ... }
inside by cached we accidentally assume that delegate is already left
and add the lambda into exitsFromCompletedPostponedAnonymousFunction.
This commit fixes the problem by exiting delegate later, after completion.
This commit is contained in:
Mikhail Glukhikh
2022-01-17 14:18:58 +03:00
committed by teamcity
parent c324bbfc37
commit 98cdc95cd0
6 changed files with 214 additions and 48 deletions
@@ -5884,6 +5884,12 @@ public class DiagnosisCompilerFirTestdataTestGenerated extends AbstractDiagnosis
public void testWeakHashMap() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/weakHashMap.kt");
}
@Test
@TestMetadata("WithValidityAssertion.kt")
public void testWithValidityAssertion() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/WithValidityAssertion.kt");
}
}
@Nested