- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
VerifyError with default parameters
Thu, 2011-07-07, 10:02
Hi,
I've got a bug with default parameters in a constructor of X where the
`init$default$x` methods end up to be `public static` methods leading
to
java.lang.VerifyError: class Y$ overrides final method init$default$1.()LZ;
when a class extending X is being loaded.
I've not yet managed to isolate a test case from that. Is there any
valid case where the `default` methods would end up as static
forwarder methods to the companion objects methods, because that is
what it looks like?
i got it reproduced and created a ticket:
https://issues.scala-lang.org/browse/SI-4777
On Thu, Jul 7, 2011 at 11:02 AM, Johannes Rudolph
wrote:
> Hi,
>
> I've got a bug with default parameters in a constructor of X where the
> `init$default$x` methods end up to be `public static` methods leading
> to
>
> java.lang.VerifyError: class Y$ overrides final method init$default$1.()LZ;
>
> when a class extending X is being loaded.
>
> I've not yet managed to isolate a test case from that. Is there any
> valid case where the `default` methods would end up as static
> forwarder methods to the companion objects methods, because that is
> what it looks like?
>
> --
> Johannes
>
> -----------------------------------------------
> Johannes Rudolph
> http://virtual-void.net
>