JVM_IR KT-50215 KT-50076 extra test
This commit is contained in:
committed by
TeamCityServer
parent
6adcbe081e
commit
e47871f98b
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user