ConstantConditionIfInspection.replaceWithBranch shouldn't remove subjectVariable with side effects

Relates to #KT-30975
This commit is contained in:
Dmitry Gridin
2019-05-29 15:38:28 +07:00
parent e2d5e9a184
commit 1c4fb9b00b
22 changed files with 89 additions and 57 deletions
@@ -1,7 +1,10 @@
// WITH_RUNTIME
fun test() {
<caret>val a = create()
use(a, a)
foo()
run {
val a = create()
use(a, a)
foo()
}
}
fun create(): String = ""