JS: allow to inherit external class from kotlin.Throwable. See KT-15336
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
external class TypeError(message: String?, fileName: String? = definedExternally, lineNumber: Int? = definedExternally) : Throwable
|
||||
|
||||
fun box(): String {
|
||||
try {
|
||||
js("null.foo()")
|
||||
return "fail: expected exception not thrown"
|
||||
}
|
||||
catch (e: TypeError) {
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user