Inline variable: fix it works correctly for 'when' subject variable
#KT-29870 Fixed
This commit is contained in:
committed by
Vladimir Dolzhenko
parent
d8ab046136
commit
e56abcbb85
@@ -0,0 +1,7 @@
|
||||
fun test(s: String) {
|
||||
when (val x = s.length) {
|
||||
1 -> println("one")
|
||||
2 -> println("two")
|
||||
else -> println(x<caret>)
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
fun test(s: String) {
|
||||
when (s.length) {
|
||||
1 -> println("one")
|
||||
2 -> println("two")
|
||||
else -> println(s.length)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user