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

method $tag overrides nothing ??

3 replies
Barry Kaplan
Joined: 2009-04-01,
User offline. Last seen 42 years 45 weeks ago.

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

Joshua.Suereth
Joined: 2008-09-02,
User offline. Last seen 32 weeks 6 days ago.
Re: method $tag overrides nothing ??
Make sure you clean your build.

What version of scala are you using?

On Tue, Mar 31, 2009 at 10:34 PM, Barry Kaplan <groups1@memelet.com> wrote:

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
--
View this message in context: http://www.nabble.com/method-%24tag-overrides-nothing----tp22818753p22818753.html
Sent from the Scala - User mailing list archive at Nabble.com.


Barry Kaplan
Joined: 2009-04-01,
User offline. Last seen 42 years 45 weeks ago.
Re: method $tag overrides nothing ??

I still the get the error with full rebuilds. I'm using 2.7.3.final

extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.
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.)

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