Sign in
pigweed
/
third_party
/
github
/
JetBrains
/
kotlin
/
b32f408767cf86efaa65eb02699fe00bd61d99a6
/
.
/
compiler
/
testData
/
codegen
/
box
/
checkcastOptimization
/
kt50215.kt
blob: b6fc5a5cf9d0d58e3fbcd48a8f073a1441c75585 [
file
]
// WITH_RUNTIME
class
A
{
fun foo
(
x
:
Int
=
32
)
=
"OK"
}
var
result
=
"failed"
fun whoops
(
x
:
Any
)
{
when
(
x
)
{
is
A
->
result
=
x
.
foo
()
else
->
throw
AssertionError
()
}
}
fun box
():
String
{
whoops
(
A
())
return
result
}