WhenWithOnlyElse: don't remove when subject variable if needed
#KT-30975 Fixed
This commit is contained in:
committed by
Dmitry Gridin
parent
7f1d30058a
commit
e955dcfc14
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
fun test() {
|
||||
when (val a = create()) {
|
||||
else -> {
|
||||
use(a, a)
|
||||
foo()
|
||||
}
|
||||
}<caret>
|
||||
}
|
||||
|
||||
fun create(): String = ""
|
||||
|
||||
fun use(s: String, t: String) {}
|
||||
|
||||
fun foo() {}
|
||||
Reference in New Issue
Block a user