Fix way how function table is built. Allows to extend Exception class. (#210)
This commit is contained in:
@@ -653,6 +653,11 @@ task catch7(type: RunKonanTest) {
|
||||
source = "runtime/exceptions/catch7.kt"
|
||||
}
|
||||
|
||||
task extend_exception(type: RunKonanTest) {
|
||||
goldValue = "OK\n"
|
||||
source = "runtime/exceptions/extend0.kt"
|
||||
}
|
||||
|
||||
task catch3(type: RunKonanTest) {
|
||||
goldValue = "Before\nCaught Throwable\nDone\n"
|
||||
source = "codegen/try/catch3.kt"
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
class C : Exception("OK")
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
try {
|
||||
throw C()
|
||||
} catch (e: Throwable) {
|
||||
println(e.message!!)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user