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
}