[#819] | project: compiler | priority: medium | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Burak | Iulian | fixed | 2006-11-12 21:48:10.0 | |
subject | verify error at runtime--backend? | |||
code |
object Test { def id[A](x: A): A = x; def main(args: Array[String]): Unit = { Console.println(id(1) * 2.0) } } |
|||
what happened | compile, the run (I use only java so the exception is shorter):tsf-wpa-1-135:~/Documents/svn/fallback.scala buraq$ java -classpath build/quick/lib/library:/tmp Molecules Exception in thread "main" java.lang.VerifyError: (class: Molecules$$anonfun$0, method: apply signature: (Lscala\ /Tuple2;)D) Expecting to find double on stack at Molecules$.main(BugBackend.scala:3) at Molecules.main(BugBackend.scala) |
|||
what expected | no verify error, computation of double 2.0 (even if its thrown away in this example) | |||
[back to overview] |
Iulian edited on 2006-11-13 10:56:53.0 |
This one has slipped in when new unboxing primitives were added. Good we found it so quickly! |
Nikolay edited on 2006-11-13 13:50:40.0 |
I was not happy with Iuli's fix because it unboxes the value and then converts it to the expected type. I fixed it to unbox directly to the expected type. I changed to code sample too. |