[#119] | project: compiler | priority: medium | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Erik | Martin | fixed | 2003-09-10 14:08:47.0 | |
subject | #Types does not match | |||
code |
class K[E] { case class A(v:E){}; } class K2 extends K[int] { val A(v) = A(42); } |
|||
what happened | >~/scala/bin/scalac K.scala K.scala:6: type mismatch; found : K.this.A required: K2.this.A val A(v) = A(42); ^ one error found |
|||
what expected | No type errror. E should be scala.Int K.this.A sould be of type K[scala.Int]#A | |||
[back to overview] |
Erik edited on 2003-09-10 14:16:34.0 |
Found an even shorter example. Perhaps it is a feature? val A(v) introduces a new name K2.A instead of doing a pattern match on the case class K.A |
Erik edited on 2003-09-10 14:27:22.0 |
Martin edited on 2003-09-10 15:52:08.0 |