- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
errors with valid java code
Wed, 2010-03-17, 19:07
Hello,
after updating the scala eclipse plugin, some valid java code is
flagged and won't compile.
Valid java code using nested static types now shows up as a
scala problem (eclipse 3.5.2, scala.tools.nsc_2.8.0.r21183-b20100316020204)
The code
: public class CodeContributor {
:
: public enum Extension {
: INIT,
: CONF_TRANSFORMER,
: FINISH;
: }
:
: Extension extension;
: String code;
:
: public CodeContributor(Extension extension, String code) {
: this.extension= extension;
: this.code= code;
: }
:
fails to compile with
| Description | Resource | Path | Location | Type |
| not found: type Extension | CodeContributor.java | .... | line 14 | Scala Problem |
I have seen a report of this on the mailing list, but that didn't provide
specific code. If it would help, I could add a ticket on the bug
tracker.
Cheers,
Michael
Thu, 2010-03-18, 02:07
#2
Re: [scala-tools] errors with valid java code
> I just fixed ticket #3133 which is exactly what you are experiencing.
>
Great! Thank you.
Thu, 2010-03-18, 18:27
#3
Re: [scala-tools] errors with valid java code
Hello again,
> I just fixed ticket #3133 which is exactly what you are experiencing.
>
> hubert
>
Your change is in r21207, so I tried the newest Scala Eclipse Plugin,
version 2.8.0.r21209-b20100318035916, but still get the error below.
Just to avoid loading any old jars, I deleted the old version of the
plugin and updated my eclipse target platform to the new version.
Fri, 2010-03-19, 11:57
#4
Re: errors with valid java code
I'm afraid I cannot reproduce your problem. Before r21207 compiling your
test case using build manager from the command line gave an error. It no
longer does it after my fix. I also updated my eclipse plugin and seems
to work without any problems. Maybe run eclipse with --clean flag (it
removes the old cruft and I do it always after the update)?
Thanks,
hubert
Michael Hohn wrote:
> From: Hubert Plociniczak
> Subject: Re: [scala-tools] errors with valid java code
> Date: Wed, 17 Mar 2010 19:31:17 +0100
>
> Hello again,
>
>
>> I just fixed ticket #3133 which is exactly what you are experiencing.
>>
>> hubert
>>
>>
>
> Your change is in r21207, so I tried the newest Scala Eclipse Plugin,
> version 2.8.0.r21209-b20100318035916, but still get the error below.
>
> Just to avoid loading any old jars, I deleted the old version of the
> plugin and updated my eclipse target platform to the new version.
>
>
I just fixed ticket #3133 which is exactly what you are experiencing.
hubert
Michael Hohn wrote:
> Hello,
>
> after updating the scala eclipse plugin, some valid java code is
> flagged and won't compile.
>
> Valid java code using nested static types now shows up as a
> scala problem (eclipse 3.5.2, scala.tools.nsc_2.8.0.r21183-b20100316020204)
> The code
> : public class CodeContributor {
> :
> : public enum Extension {
> : INIT,
> : CONF_TRANSFORMER,
> : FINISH;
> : }
> :
> : Extension extension;
> : String code;
> :
> : public CodeContributor(Extension extension, String code) {
> : this.extension= extension;
> : this.code= code;
> : }
> :
> fails to compile with
> | Description | Resource | Path | Location | Type |
> | not found: type Extension | CodeContributor.java | .... | line 14 | Scala Problem |
>
> I have seen a report of this on the mailing list, but that didn't provide
> specific code. If it would help, I could add a ticket on the bug
> tracker.
>
> Cheers,
> Michael
>