TEST: throw keyword support.

This commit is contained in:
Nikolay Igotti
2016-11-21 17:36:36 +03:00
committed by KonstantinAnisimov
parent 0cd4512dd5
commit 81811e8c3a
6 changed files with 26 additions and 2 deletions
@@ -0,0 +1,8 @@
fun main(args : Array<String>) {
val cond = 1
if (cond == 2) throw RuntimeException()
if (cond == 3) throw NoSuchElementException("no such element")
if (cond == 4) throw Error("error happens")
println("Done")
}