Aladdin - Scala Bugtracking
[#523] project: compiler priority: low category: bug
submitter assigned to status date submitted
Lex Iulian fixed 2006-01-27 21:49:42.0
subject a try that immediately and only throw's is compiled with an extra "pop" instruction
code
object Test {
  def main(args:Array[String]): Unit = {
    try {
      throw new Error();
    }
    catch {
      case _ => Console.println("exception happened\n");
    }
  }
}
what happened
Exception in thread "main" java.lang.VerifyError: (class: Test$, method: main si
gnature: ([Ljava/lang/String;)V) Unable to pop operand off an empty stack
        at Test.main(justthrow.scala)
what expected It should compile, run, throw the exception, and catch the exception in the exception handler.
[back to overview]
Changes of this bug report
Martin  edited on  2006-01-28 19:57:35.0
Iulian  edited on  2006-01-30 11:11:46.0