- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
Case class with companion object gives error in Scala for Netbeans 2.8 RC1
Sun, 2009-11-29, 03:21
Is there a known problem with adding companion objects to case classes in Scala 2.8.0? Scala for Netbeans currently flags this as an error saying it's a duplicate definition.
Error messages:
- constructor definition not allowed here
- constructor <classname> defined twice
My current install is:
- Scala 2.8.0 beta1 rc2
- Scala for Netbeans 6.8 1.1.0 rc1
- Netbeans 6.8 rc1
Error messages:
- constructor definition not allowed here
- constructor <classname> defined twice
My current install is:
- Scala 2.8.0 beta1 rc2
- Scala for Netbeans 6.8 1.1.0 rc1
- Netbeans 6.8 rc1
Sun, 2009-11-29, 08:47
#2
Re: [netbeans] Case class with companion object gives error in
This is a strange error that I encountered also when I tried to build
scala trunk for jvm-5 on my Mac OSX. I'm not sure where is from yet,
but, for NetBeans users, you can try to put the object code
behind/below/after the class code as a quick tip.
Sun, 2009-11-29, 09:07
#3
Re: [netbeans] Case class with companion object gives error in
BTW, you should be careful here since case class has a default
companion object.
On Sun, Nov 29, 2009 at 3:41 PM, Caoyuan wrote:
> This is a strange error that I encountered also when I tried to build
> scala trunk for jvm-5 on my Mac OSX. I'm not sure where is from yet,
> but, for NetBeans users, you can try to put the object code
> behind/below/after the class code as a quick tip.
>
>
> On Sun, Nov 29, 2009 at 3:22 PM, Andrew Gaydenko wrote:
>> On Sunday 29 November 2009 05:21:09 Trond Olsen wrote:
>>> Is there a known problem with adding companion objects to case classes in
>>> Scala 2.8.0? Scala for Netbeans currently flags this as an error saying
>>> it's a duplicate definition.
>>>
>>> *Error messages:*
>>> - constructor definition not allowed here
>>> - constructor defined twice
>>>
>>> *My current install is:*
>>> - Scala 2.8.0 beta1 rc2
>>> - Scala for Netbeans 6.8 1.1.0 rc1
>>> - Netbeans 6.8 rc1
>>>
>>
>> I have met the problem also (and have reported to Caoyuan).
>>
>> (please, add [netbeans] to a subject for NB-related topics)
>>
>>
>> Andrew
>>
>
Sun, 2009-11-29, 15:47
#4
Re: [netbeans] Case class with companion object gives error in
Thanks. Changing the order of case class and companion object works fine.
Could the problem somehow be related to ticket #1015 when IDE support was integrated into the Scala 2.8.0 compiler?
On Sun, Nov 29, 2009 at 8:41 AM, Caoyuan <dcaoyuan@gmail.com> wrote:
Could the problem somehow be related to ticket #1015 when IDE support was integrated into the Scala 2.8.0 compiler?
On Sun, Nov 29, 2009 at 8:41 AM, Caoyuan <dcaoyuan@gmail.com> wrote:
This is a strange error that I encountered also when I tried to build
scala trunk for jvm-5 on my Mac OSX. I'm not sure where is from yet,
but, for NetBeans users, you can try to put the object code
behind/below/after the class code as a quick tip.
On Sun, Nov 29, 2009 at 3:22 PM, Andrew Gaydenko <a@gaydenko.com> wrote:
> On Sunday 29 November 2009 05:21:09 Trond Olsen wrote:
>> Is there a known problem with adding companion objects to case classes in
>> Scala 2.8.0? Scala for Netbeans currently flags this as an error saying
>> it's a duplicate definition.
>>
>> *Error messages:*
>> - constructor definition not allowed here
>> - constructor <classname> defined twice
>>
>> *My current install is:*
>> - Scala 2.8.0 beta1 rc2
>> - Scala for Netbeans 6.8 1.1.0 rc1
>> - Netbeans 6.8 rc1
>>
>
> I have met the problem also (and have reported to Caoyuan).
>
> (please, add [netbeans] to a subject for NB-related topics)
>
>
> Andrew
>
On Sunday 29 November 2009 05:21:09 Trond Olsen wrote:
> Is there a known problem with adding companion objects to case classes in
> Scala 2.8.0? Scala for Netbeans currently flags this as an error saying
> it's a duplicate definition.
>
> *Error messages:*
> - constructor definition not allowed here
> - constructor defined twice
>
> *My current install is:*
> - Scala 2.8.0 beta1 rc2
> - Scala for Netbeans 6.8 1.1.0 rc1
> - Netbeans 6.8 rc1
>
I have met the problem also (and have reported to Caoyuan).
(please, add [netbeans] to a subject for NB-related topics)
Andrew