|
[#937] |
project: specification |
priority: low |
category: bug |
|
submitter |
assigned to |
status |
date submitted |
|
Sean |
Martin |
won't fix |
2007-02-11 15:27:26.0 |
subject |
companion module members not imported into class or subclasses |
code |
object AbstractGame {
protected val MAGICAL_CONSTANTS_FOR_SUBCLASSES = 42;
}
abstract class AbstractGame {
// import AbstractGame._;
MAGICAL_CONSTANTS_FOR_SUBCLASSES;
}
|
what happened |
won't compile
|
what expected |
I thought the members of a companion module are supposed to be auto-imported. If we want static fields to behave like they do in Java, the companion module would have to be imported into sub-classes also. |
[back to overview] |