| [#199] | project: compiler | priority: low | category: bug | |
|---|---|---|---|---|
| submitter | assigned to | status | date submitted | |
| Vincent | Martin | fixed | 2003-10-17 13:31:27.0 | |
| subject | object in class | |||
| code |
class C { object o; }
object objectInClass {
def main(args: Array[String]) = {
(new C).o; ()
}
}
|
|||
| what happened | At runtime :
Exception in thread "main" java.lang.NoSuchFieldError: o$
at C$class.o(objectInClass.scala:1)
at objectInClass$.main(objectInClass.scala:5)
at objectInClass.main(objectInClass.scala)
|
|||
| what expected | No runtime error. | |||
| [back to overview] | ||||
| Michel edited on 2003-10-21 09:25:34.0 |
|
The problem here is that the variable which holds the object instance is not put in the members of the class To fix this bug, |
| Martin edited on 2003-10-21 15:06:20.0 |
| Martin edited on 2003-10-21 15:06:30.0 |