- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Allowed to have case class and explicit (enhanced) companion object?
Wed, 2009-12-30, 01:13
Hi,
i was wondering... is this problematic (scala 2.8):
object X {
... some functionality ...
}
case class X( a: Int, b: Int )
the netbeans plugin puts an error marker on "object X", saying that X has a duplicate constructor, but in fact scalac compiles without problem, and the code seems to run fine...
it's cool to have the possibility to enhance the companion object of a case class, just want to make sure that this is officially supported...
cheers, -sciss-
On Tue, Dec 29, 2009 at 10:13 PM, Sciss <contact@sciss.de> wrote:
--
Daniel C. Sobral
I travel to the future all the time.