Sign in
pigweed
/
third_party
/
github
/
JetBrains
/
kotlin
/
0cdb643f859f08ca7101919a9dd985b7c112109a
/
.
/
compiler
/
testData
/
codegen
/
box
/
regressions
/
arrayLengthNPE.kt
blob: e3c91e64aafc1b3aeff9a0e80ab96603dc9d37cf [
file
]
// See KT-14242
var
x
=
1
fun box
():
String
{
val testArray
:
Array
<
String
?>?
=
when
(
1
)
{
x
->
null
else
->
arrayOfNulls
<
String
>(
0
)
}
// Must not be NPE here
val size
=
testArray
?.
size
return
size
?.
toString
()
?:
"OK"
}