Aladdin - Scala Bugtracking
[#1076] project: compiler priority: low category: bug
submitter assigned to status date submitted
Nikolay Iulian fixed 2007-05-01 12:46:04.0
subject [contrib #446] VerifyError with early field initializer
code
// Example from the Scala change log

package tests

object Early extends Application {
    
  trait Greeting {
    val name: String
    val msg = "How are you, " + name
  }
  class C extends {
    val name = "Bob"
  } with Greeting {
    println(msg)
  }
  
  new C
}
what happened
java.lang.VerifyError: (class: tests/Early$C, method:  signature: ()V) Expecting to find object/array on s\
tack
        at tests.Early$.(Early.scala:15)
        at tests.Early$.(Early.scala)
        at tests.Early.main(Early.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:75)
        at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:106)
        at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
what expected How are you, Bob
[back to overview]
Changes of this bug report
Nikolay  edited on  2007-05-01 12:48:17.0
contribution #446
Iulian  edited on  2007-05-01 16:57:05.0
Fixed my making addMixinConstructorCalls take into account valdefs occuring in an early initialization section.