This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Verify Error, expecting to find object/array on stack

2 replies
Philipp Dörfler
Joined: 2010-05-24,
User offline. Last seen 42 years 45 weeks ago.
Greetings,

why does the following cause a java.lang.VerifyError when run (Scala 2.7.7, 2.8.0, 2.8.1)? And why doesn't scalac already catch this?

----------------------
package meep

case class ParentType(parameter: String)

object ChildType extends ParentType(ChildType.something) {
  val something = "1.2.3.4"
}

object Main {
  def main(args: Array[String]): Unit = {
    println(ChildType) // <- That's line 11
  }
}
---------------------

The more interesting part of the resulting error is:
java.lang.VerifyError: (class: meep/ChildType$, method: <init> signature: ()V) Expecting to find object/array on stack
        at meep.Main$.main(Main.scala:11)
        at meep.Main.main(Main.scala)
(snip)

Any ideas?

Kind regards
--
~ Philipp

Johannes Rudolph 2
Joined: 2010-02-12,
User offline. Last seen 42 years 45 weeks ago.
Re: Verify Error, expecting to find object/array on stack

On Sun, Dec 5, 2010 at 11:56 AM, Philipp Dörfler
wrote:
> object ChildType extends ParentType(ChildType.something) {
>   val something = "1.2.3.4"
> }

Looks similar to this:

http://lampsvn.epfl.ch/trac/scala/ticket/3913

Philipp Dörfler
Joined: 2010-05-24,
User offline. Last seen 42 years 45 weeks ago.
Re: Verify Error, expecting to find object/array on stack
Thanks for the fast reply. Good to know that a similar issue was already fixed.

2010/12/5 Johannes Rudolph <johannes [dot] rudolph [at] googlemail [dot] com>
Looks similar to this:

http://lampsvn.epfl.ch/trac/scala/ticket/3913

--
Johannes

-----------------------------------------------
Johannes Rudolph
http://virtual-void.net



--
~ Philipp

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland