-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Description
Works for 2.9.1, 2.9.2 and 2.10.0-M2. Does not work for 2.10.0-M7.
object TailrecAfterTryCatch {
@annotation.tailrec
final def good1() {
1 match {
case 2 => {
try {
// return
} catch {
case e: ClassNotFoundException =>
}
good1()
}
}
}
@annotation.tailrec
final def good2() {
//1 match {
// case 2 => {
try {
return
} catch {
case e: ClassNotFoundException =>
}
good2()
// }
//}
}
@annotation.tailrec
final def good3() {
val 1 = 2
try {
return
} catch {
case e: ClassNotFoundException =>
}
good3()
}
@annotation.tailrec
final def bad() {
1 match {
case 2 => {
try {
return
} catch {
case e: ClassNotFoundException =>
}
bad()
}
}
}
}