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(value: Any): String {
|
||||
return when (val <caret>v = value) {
|
||||
is String -> "$v is String"
|
||||
is Int -> "$v is Int"
|
||||
else -> "$v"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
fun test(value: Any): String {
|
||||
return when (value) {
|
||||
is String -> "$value is String"
|
||||
is Int -> "$value is Int"
|
||||
else -> "$value"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user