Aladdin - Scala Bugtracking
[#984] project: compiler priority: medium category: bug
submitter assigned to status date submitted
Gilles Iulian fixed 2007-03-09 15:36:24.0
subject Bad bytecode for translation of Int.box
code
def test {
  while (true) {
    Int.box(22)
  }
}
what happened
java.lang.VerifyError: (class: TestBox$, method: test3 signature: ()V) Inconsistent stack height 1 != 0
        at TestBox.main(testBox.scala)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at scala.tools.nsc.ObjectRunner$.run(ObjectRunner.scala:76)
        at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:106)
        at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
what expected No error.
[back to overview]
Changes of this bug report
Iulian  edited on  2007-03-09 15:40:23.0
It works on my machine. I'm afraid you need to post a complete program.
Iulian  edited on  2007-03-09 15:44:27.0
It works on my machine. I'm afraid you need to post a complete program.
Iulian  edited on  2007-03-09 15:44:31.0
It works on my machine. I'm afraid you need to post a complete program.
Gilles  edited on  2007-03-09 16:04:17.0
Actually, there needs to be a while around the box for it to fail.
Iulian  edited on  2007-03-09 16:12:29.0