[FIR] Fix for AugmentedArraySetCall expression type

Hacky fix so it's type is Unit and not error
This commit is contained in:
Andrey Zinovyev
2021-04-29 19:03:36 +03:00
committed by TeamCityServer
parent 6365164c21
commit 287ff3ed55
2 changed files with 8 additions and 2 deletions
@@ -952,7 +952,14 @@ open class FirExpressionsResolveTransformer(transformer: FirBodyResolveTransform
)
}
}
firstSucceed -> firstResult
firstSucceed -> {
//checking secondResult leave erroneous nodes in dfa graph,
//we add another block so final type of expression will be correct
//todo replace this hack with proper graph cleaning
transformer.components.dataFlowAnalyzer.enterBlock(augmentedArraySetCall.setGetBlock)
transformer.components.dataFlowAnalyzer.exitBlock(augmentedArraySetCall.setGetBlock)
firstResult
}
secondSucceed -> secondResult
else -> {
augmentedArraySetCall.also {
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// WITH_RUNTIME
class Host(var value: String) {