JVM_IR KT-50215 KT-50076 extra test

This commit is contained in:
Dmitry Petrov
2021-12-13 17:29:30 +03:00
committed by TeamCityServer
parent 6adcbe081e
commit e47871f98b
10 changed files with 1395 additions and 8 deletions
@@ -0,0 +1,19 @@
// 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
}