| [#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):
|
|||
| 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. |