Open scabug opened 16 years ago
Imported From: https://issues.scala-lang.org/browse/SI-144?orig=1 Reporter: @adriaanm
Currently (on Scala 2.13.0) the error message is:
On line 13: error: incompatible type in overriding
type TList[x] <: SpecialLists.this.List[x] (defined in trait Lists);
found : [x(in type TList) <: SpecialLists.this.B] <: SpecialLists.this.BoundedList[x(in type TList)]
required: [x(in type TList)] <: SpecialLists.this.List[x(in type TList)]
I don't know if it's clear enough or not
Here's Dotty (0.20.0-RC1):
[error] -- Error: /private/tmp/si-144/src/main/scala/Lists.scala:13:7 ------------------
[error] 13 | type TList[x <: B] <: BoundedList[x]
[error] | ^
[error] |error overriding type TList in trait Lists with bounds <: SpecialLists.this.List;
[error] | type TList with bounds <: SpecialLists.this.BoundedList has incompatible type
[error] one error found
[error] (Compile / compileIncremental) Compilation failed
when reporting a problem with overriding an abstract type with a concrete type, the involved type should be normalised so the error message becomes more explicit
error message: