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

VerifyError with default parameters

1 reply
Johannes Rudolph 2
Joined: 2010-02-12,
User offline. Last seen 42 years 45 weeks ago.

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 Rudolph 2
Joined: 2010-02-12,
User offline. Last seen 42 years 45 weeks ago.
Re: VerifyError with default parameters

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
>

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