| [#85] | project: compiler | priority: medium | category: bug | |
|---|---|---|---|---|
| submitter | assigned to | status | date submitted | |
| Philippe | Martin | fixed | 2003-08-12 17:45:40.0 | |
| subject | ill typed case class accessor | |||
| code |
object A {
case class B(c: C) {
class C;
}
class C;
val b: B = new B(new C());
val c: C = b.c;
}
|
|||
| what happened | tmp/test.scala:7: type mismatch;
found : A#13.b#14.C#15
required: A#13.C#16
val c: C = b.c;
^
|
|||
| what expected | This should compile. It does if the class C inside class B is removed. The problem is that the accessor for x has the wrong type (B.this.C instead of A.this.C). | |||
| [back to overview] | ||||
| Martin edited on 2003-08-13 15:13:31.0 |