backend: add tests for try-catch-finally and throwing exceptions
also add some tests for bugs with unreachable code handling and variables
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
fun main(args : Array<String>) {
|
||||
try {
|
||||
throw Error("Error happens")
|
||||
} catch (e: Throwable) {
|
||||
val message = e.message
|
||||
if (message != null) {
|
||||
println(message)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user