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
+9
@@ -0,0 +1,9 @@
|
||||
fun test() {
|
||||
when (val a = create()) {
|
||||
else -> use(a, a)
|
||||
}<caret>
|
||||
}
|
||||
|
||||
fun create(): String = ""
|
||||
|
||||
fun use(s: String, t: String) {}
|
||||
Reference in New Issue
Block a user