Files
kotlin-fork/js/js.translator/testData/box/rtti/exceptionIsInterface.kt
T
2017-07-19 12:24:09 +03:00

14 lines
234 B
Kotlin
Vendored

// EXPECTED_REACHABLE_NODES: 996
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"
}