Files
kotlin-fork/js/js.translator/testData/box/rtti/exceptionIsInterface.kt
T
2018-09-12 09:49:25 +03:00

14 lines
235 B
Kotlin
Vendored

// EXPECTED_REACHABLE_NODES: 1287
interface I
class MyException: Exception(), I
fun box(): String {
var e: Any = MyException()
if (e !is I) return "fail1"
e = Exception()
if (e is I) return "fail2"
return "OK"
}