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

Stacked traits are causing scala to produce final methods

No replies
Werner Punz
Joined: 2011-01-29,
User offline. Last seen 42 years 45 weeks ago.

Hi I am trying to use stacked traits in conjunction with CDI.
I now have the problem that as soon as I "width" my stacked traits into
my main class, it generally compiles, but the scala compiler weaves
final methods into the final class.

The stacked traits and the class which is decorated have a common
abstract base class.

The problem here is that CDI refuses to use the produced class due to
the fact that it has final methods.
(There is not a single final method declared in the code)

Is there a way to give the compiler a hint, to avoid auto finalization
of internally produced methods?

Werner

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