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

a note on compilation failure

No replies
michael hohn
Joined: 2009-11-27,
User offline. Last seen 42 years 45 weeks ago.

Hi,

I found the fix for my compilation problem and thought I would
share this.

Valid java code using nested static types may show up as a
scala problem.
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 |

When the offending code is in a plugin A *without* a scala nature
added, but depends on a plugin B *with* scala nature, this error
occurs. Adding the scala nature to A fixes the problem.

Cheers,
Mike

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