Aladdin - Scala Bugtracking
[#842] project: compiler priority: low category: bug
submitter assigned to status date submitted
Nikolay Iulian fixed 2006-11-27 12:34:03.0
subject [contrib #267] Double.toInt/toLong with addition causing runtime error
code
object Test extends Application {
  1.0+1.0.toLong
}
what happened
Runtime error:

java.lang.VerifyError: (class: Test$, method:  signature: ()V) Expecting to find double on stack
        at Test.main(testcase1.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:585)
        at scala.tools.nsc.ObjectRunner$.run(ObjectRunner.scala:76)
        at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:97)
        at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)

what expected 2.0
[back to overview]
Changes of this bug report
Nikolay  edited on  2006-11-27 12:35:00.0
Contribution #267
Iulian  edited on  2006-11-27 14:41:55.0