ConstantConditionIfInspection.replaceWithBranch shouldn't remove subjectVariable with side effects
Relates to #KT-30975
This commit is contained in:
Vendored
+6
-3
@@ -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 = ""
|
||||
|
||||
Reference in New Issue
Block a user