blob: 5ab1747856d8145574e91cc15eb81520e9afe5d5 (
plain) (
tree)
|
|
object Test {
def f(): Int = {
try {
val g = (1 to 10 map { i => return 16 ; i }).sum
g
}
catch { case x: runtime.NonLocalReturnControl[_] =>
println(x.getClass.getName)
x.value.asInstanceOf[Int]
}
}
def main(args: Array[String]): Unit = {
println(f())
}
}
|