b2041e0927
There are many complications with the current design of passing data from within in-place lambdas to surrounding code. Solving these complications will involve more time to investigation than is available within the K2 release. So we are disabling passing type statement information from lambdas for the time being until more time can be devoted to a more complete solution. ^KT-60958 Fixed ^KT-63530 Fixed
8 lines
209 B
Kotlin
Vendored
8 lines
209 B
Kotlin
Vendored
// KT-9051: Allow smart cast for captured variables if they are not modified
|
|
|
|
fun foo(y: String) {
|
|
var x: String? = null
|
|
y.let { x = it }
|
|
x<!UNSAFE_CALL!>.<!>length // Smart cast is not possible
|
|
}
|