Scala Programming Language
  1. Scala Programming Language
  2. SI-5171

java.lang.VerifyError: class com.restphone.IsList$ overrides final method canEqual.

    Details

      Description

      Fails in 2.91. Also fails with scala-2.9.2.r25964-b20111108042542.

      Get:
      [error] (run-main) java.lang.VerifyError: class com.restphone.IsList$ overrides final method canEqual.(Ljava/lang/Object;)Z
      java.lang.VerifyError: class com.restphone.IsList$ overrides final method canEqual.(Ljava/lang/Object;)Z
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
      at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
      at com.restphone.TypeBuilder$.extractType$1(TypeBuilder.scala:34)
      at com.restphone.TypeBuilder$.innerToList$1(TypeBuilder.scala:46)
      at com.restphone.TypeBuilder$$anonfun$getDescendents$1$1.apply(TypeBuilder.scala:29)
      at com.restphone.TypeBuilder$$anonfun$getDescendents$1$1.apply(TypeBuilder.scala:29)
      at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:200)
      at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:200)
      at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
      at scala.collection.immutable.List.foreach(List.scala:45)
      at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:200)
      at scala.collection.immutable.List.flatMap(List.scala:45)
      at com.restphone.TypeBuilder$.getDescendents$1(TypeBuilder.scala:29)
      at com.restphone.TypeBuilder$.innerToList$1(TypeBuilder.scala:48)
      at com.restphone.TypeBuilder$$anonfun$getDescendents$1$1.apply(TypeBuilder.scala:29)
      at com.restphone.TypeBuilder$$anonfun$getDescendents$1$1.apply(TypeBuilder.scala:29)
      at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:200)
      at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:200)
      at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
      at scala.collection.immutable.List.foreach(List.scala:45)
      at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:200)
      at scala.collection.immutable.List.flatMap(List.scala:45)
      at com.restphone.TypeBuilder$.getDescendents$1(TypeBuilder.scala:29)
      at com.restphone.TypeBuilder$.innerToList$1(TypeBuilder.scala:48)
      at com.restphone.TypeBuilder$$anonfun$getDescendents$1$1.apply(TypeBuilder.scala:29)
      at com.restphone.TypeBuilder$$anonfun$getDescendents$1$1.apply(TypeBuilder.scala:29)
      at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:200)
      at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:200)
      at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
      at scala.collection.immutable.List.foreach(List.scala:45)
      at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:200)
      at scala.collection.immutable.List.flatMap(List.scala:45)
      at com.restphone.TypeBuilder$.getDescendents$1(TypeBuilder.scala:29)
      at com.restphone.TypeBuilder$.innerToList$1(TypeBuilder.scala:48)
      at com.restphone.TypeBuilder$.toList(TypeBuilder.scala:53)
      at com.restphone.TypeBuilder$.doit(TypeBuilder.scala:58)
      at com.restphone.ParserApp$delayedInit$body.apply(XmlImportApp.scala:27)
      at scala.Function0$class.apply$mcV$sp(Function0.scala:34)
      at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
      at scala.App$$anonfun$main$1.apply(App.scala:60)
      at scala.App$$anonfun$main$1.apply(App.scala:60)
      at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
      at scala.collection.immutable.List.foreach(List.scala:45)
      at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:30)
      at scala.App$class.main(App.scala:60)
      at com.restphone.ParserApp$.main(XmlImportApp.scala:5)
      at com.restphone.ParserApp.main(XmlImportApp.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)
      java.lang.RuntimeException: Nonzero exit code: 1
      at scala.sys.package$.error(package.scala:27)
      at scala.Predef$.error(Predef.scala:66)
      [error]

      {file:/C:/cygwin/home/james/workspace/Deleteme3/}

      default-867d1f/compile:run: Nonzero exit code: 1
      [error] Total time: 10 s, completed Nov 9, 2011 12:05:31 AM

      If I rebuild with scala-2.10.0.r25972-b20111109023956 I don't see the problem.

      Similar to:
      https://issues.scala-lang.org/browse/SI-4931
      https://issues.scala-lang.org/browse/SI-5105
      https://issues.scala-lang.org/browse/SI-4575
      https://issues.scala-lang.org/browse/SI-1055
      https://issues.scala-lang.org/browse/SI-1037

      But I can't tell if this should be a reopen of one of those or a new issue.

      Also similar to this discussion:

      https://groups.google.com/forum/#!topic/scala-user/LLBs0ocrMjA

        Activity

        Hide
        James Moore added a comment -

        This is a scratch project. Don't try to make sense of the code. It does repro the problem reliably though, using "sbt run"

        Show
        James Moore added a comment - This is a scratch project. Don't try to make sense of the code. It does repro the problem reliably though, using "sbt run"
        Hide
        James Moore added a comment -

        here's a much smaller repro case:

        package com.restphone

        abstract sealed class ArgNumber
        case object IsList extends ArgNumber
        case object ArgNumber

        object Testing extends App

        { println(IsList) }
        Show
        James Moore added a comment - here's a much smaller repro case: package com.restphone abstract sealed class ArgNumber case object IsList extends ArgNumber case object ArgNumber object Testing extends App { println(IsList) }
        Hide
        Paul Phillips added a comment -

        Confirmed present in 2.9.1 and absent in trunk; tagging for 2.9.2.

        Show
        Paul Phillips added a comment - Confirmed present in 2.9.1 and absent in trunk; tagging for 2.9.2.
        Hide
        Szabolcs Berecz added a comment - - edited

        Test case in a1d8029

        Show
        Szabolcs Berecz added a comment - - edited Test case in a1d8029
        Hide
        Szabolcs Berecz added a comment - - edited

        I just realized this might need a fix for 2.9.2, so reopening. Sorry for the noise.

        Show
        Szabolcs Berecz added a comment - - edited I just realized this might need a fix for 2.9.2, so reopening. Sorry for the noise.
        Hide
        Jason Zaugg added a comment -

        Closing as fixed in 2.10.0.

        Show
        Jason Zaugg added a comment - Closing as fixed in 2.10.0.

          People

          • Assignee:
            Paul Phillips
            Reporter:
            James Moore
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development