Sign in
pigweed
/
third_party
/
github
/
JetBrains
/
kotlin
/
f7ff397a310cd4d47fc4849043f8c9d47412e512
/
.
/
compiler
/
testData
/
codegen
/
box
/
smartCasts
/
whenSmartCast.kt
blob: c1f5c2155d510563f5473cacc9f89f9b9c955c0d [
file
]
// IGNORE_BACKEND_FIR: JVM_IR
fun baz
(
s
:
String
?):
Int
{
if
(
s
==
null
)
return
0
return
when
(
s
)
{
"abc"
->
s
else
->
"xyz"
}.
length
}
fun box
()
=
if
(
baz
(
"abc"
)
==
3
&&
baz
(
""
)
==
3
&&
baz
(
null
)
==
0
)
"OK"
else
"FAIL"