98088f739d
`in x` is represented as `<subject expression> in x` in psi, so generating the entire call and then replacing the argument with a read of a temporary results in redundant regenerations of the subject. #KT-42054 Fixed #KT-42455 Fixed
10 lines
183 B
Kotlin
Vendored
10 lines
183 B
Kotlin
Vendored
// WITH_RUNTIME
|
|
// KJS_WITH_FULL_RUNTIME
|
|
fun box(): String {
|
|
val xs = listOf(1, 2, 3)
|
|
return when (xs.first { it > 1 }) {
|
|
in xs -> "OK"
|
|
else -> "fail"
|
|
}
|
|
}
|