[#607] | project: compiler | priority: low | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Nikolay | Martin | fixed | 2006-05-18 18:19:01.0 | |
subject | [contrib #129] Confusion over the identity of object member types | |||
code |
object Test { trait Foo { type T } object FooX extends Foo { type T = X; trait X } def test(x : Foo { type T = FooX.X }) = {} def main(argv : Array[String]) : Unit = { test(FooX) } } |
|||
what happened | test.scala:9 error: type mismatch; found : Test.this.FooX.type (with underlying type Test.this.FooX) required: Test.this.Foo{override type T = Test.this.FooX.X} test(FooX) ^ one error found |
|||
what expected | No error (this compiles with Scala 1.3). It compiles with Scala 2 when X is moved outside FooX. | |||
[back to overview] |
Nikolay edited on 2006-05-18 18:19:51.0 |
Martin edited on 2006-05-21 15:57:08.0 |