You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to PaulP, this is "another variation on #473 (and later, #3913)" -- code compiles but causes a VerifyError when loaded.
Welcome to Scala version 2.10.0 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0).
Type in expressions to have them evaluated.
Type :help for more information.
scala> abstract class A( val someAs: A* )
defined class A
scala> object B extends A(B)
defined module B
scala> B.someAs
java.lang.VerifyError: (class: B$, method: signature: ()V) Expecting to find object/array on stack
When I pass in a Set rather than a varargs list, I get a reasonable error:
scala> abstract class A( val someAs: Set[A] )
defined class A
scala> object B extends A(Set(B))
:11: error: super constructor cannot be passed a self reference unless parameter is declared by-name
object B extends A(Set(B))
The text was updated successfully, but these errors were encountered:
According to PaulP, this is "another variation on #473 (and later, #3913)" -- code compiles but causes a VerifyError when loaded.
Welcome to Scala version 2.10.0 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0).
Type in expressions to have them evaluated.
Type :help for more information.
scala> abstract class A( val someAs: A* )
defined class A
scala> object B extends A(B)
defined module B
scala> B.someAs
java.lang.VerifyError: (class: B$, method: signature: ()V) Expecting to find object/array on stack
When I pass in a Set rather than a varargs list, I get a reasonable error:
scala> abstract class A( val someAs: Set[A] )
defined class A
scala> object B extends A(Set(B))
:11: error: super constructor cannot be passed a self reference unless parameter is declared by-name
object B extends A(Set(B))
The text was updated successfully, but these errors were encountered: