Sign in
pigweed
/
third_party
/
github
/
JetBrains
/
kotlin
/
e1e07d20949869a38f2fc0b6ceeea1235721f07f
/
.
/
compiler
/
testData
/
diagnostics
/
testsWithStdLib
/
smartcasts
/
letStable.kt
blob: 426fdd20c11955ee6c4f9ff44609d16a3ee08da8 [
file
]
// KT-9051: Allow smart cast for captured variables if they are not modified
fun foo
(
y
:
String
?)
{
var
x
:
String
?
=
""
if
(
x
!=
null
)
{
y
?.
let
{
x
!=
y
}
// x is not changed, smart cast is possible
<!
DEBUG_INFO_SMARTCAST
!>
x
<!>.
length
}
}