|
[#762] |
project: compiler |
priority: low |
category: bug |
|
submitter |
assigned to |
status |
date submitted |
|
Nikolay |
Martin |
fixed |
2006-09-24 16:57:05.0 |
subject |
[contrib #215] Another type conformance problem |
code |
trait Foo { type T }
trait Bar extends Foo { val x : Foo { type T <: Bar.this.T } = this : this.type }
|
what happened |
:5 error: type mismatch;
found : Bar.this.type (with underlying type line17$object.this.Bar)
required: line16$object.Foo{override type T <: Bar.this.T}
trait Bar extends Foo { val x : Foo { type T <: Bar.this.T } = this : this.type }
|
what expected |
The type should conform. An additional type annotation for an intermediate step helps the compiler figure this out:
(this : this.type) : Foo { type T = Bar.this.T }
Now it compiles OK. Still, I don't think the annotation should be necessary.
|
[back to overview] |