[FIR, by demiurg] Fix exception in DFA for a case with lambda empty body
This commit is contained in:
+4
-1
@@ -19,4 +19,7 @@ class FirControlFlowGraphReferenceImpl(val controlFlowGraph: ControlFlowGraph) :
|
||||
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirControlFlowGraphReference {
|
||||
return this
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val FirControlFlowGraphReference.controlFlowGraph: ControlFlowGraph?
|
||||
get() = (this as? FirControlFlowGraphReferenceImpl)?.controlFlowGraph
|
||||
+3
-1
@@ -173,7 +173,9 @@ class ControlFlowGraphBuilder {
|
||||
is StubNode -> firstPreviousNode.extractArgument()
|
||||
else -> fir.extractArgument()
|
||||
}
|
||||
return exitsOfAnonymousFunctions.getValue(function).previousNodes.mapNotNull {
|
||||
|
||||
val exitNode = function.controlFlowGraphReference.controlFlowGraph?.exitNode ?: exitsOfAnonymousFunctions.getValue(function)
|
||||
return exitNode.previousNodes.mapNotNull {
|
||||
it.extractArgument() as FirStatement?
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user