[FIR] don't transform analyzed lambda
Inside `transformDeclarationContent` current tower data context is saved. Previously, stored context could be incomplete, because `dataFlowAnalyzer.enterFunction(function)` wasn't called in all cases. ^KTIJ-26419 Fixed
This commit is contained in:
committed by
Space Team
parent
673ac2227a
commit
9548486b55
+5
-9
@@ -666,16 +666,12 @@ open class FirDeclarationsResolveTransformer(
|
||||
function: FirFunction,
|
||||
data: ResolutionMode
|
||||
): FirStatement = whileAnalysing(session, function) {
|
||||
val functionIsNotAnalyzed = !function.bodyResolved
|
||||
if (functionIsNotAnalyzed) {
|
||||
dataFlowAnalyzer.enterFunction(function)
|
||||
}
|
||||
if (function.bodyResolved) return function
|
||||
dataFlowAnalyzer.enterFunction(function)
|
||||
return transformDeclarationContent(function, data).also {
|
||||
if (functionIsNotAnalyzed) {
|
||||
val result = it as FirFunction
|
||||
val controlFlowGraphReference = dataFlowAnalyzer.exitFunction(result)
|
||||
result.replaceControlFlowGraphReference(controlFlowGraphReference)
|
||||
}
|
||||
val result = it as FirFunction
|
||||
val controlFlowGraphReference = dataFlowAnalyzer.exitFunction(result)
|
||||
result.replaceControlFlowGraphReference(controlFlowGraphReference)
|
||||
} as FirStatement
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user