- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
method $tag overrides nothing ??
Wed, 2009-04-01, 03:34
I'm getting the compilation error "method $tag overrides nothing" at lines 2
and 3 for the case objects with the following:
abstract class Currency(val name: String)
case object USCurrency extends Currency("US")
case object CanadianCurrency extends Currency("Canadian")
If I make the class Currency a case class, then I get the error only on line
1 for the class.
What does this message mean? If I recall, $tag, defined on ScalaObject, is
there to help with pattern matching.
-barry
Wed, 2009-04-01, 03:57
#2
Re: method $tag overrides nothing ??
I still the get the error with full rebuilds. I'm using 2.7.3.final
Wed, 2009-04-01, 04:07
#3
Re: method $tag overrides nothing ??
On Tue, Mar 31, 2009 at 07:45:43PM -0700, Barry Kaplan wrote:
> I still the get the error with full rebuilds. I'm using 2.7.3.final
I do not think you are -- it is likely you are somehow using a mix of
2.7.3 and something more recent. The code you supplied works fine on
either 2.7.3 or trunk individually, but since $tag was ditched a few
weeks ago, a mix will cause you problems. (A mix will almost always
cause you problems, but this would be one of the most visible.)
What version of scala are you using?
On Tue, Mar 31, 2009 at 10:34 PM, Barry Kaplan <groups1@memelet.com> wrote: