You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-- [E056] TypeMismatchError:/tmp/scastie722928142903515025/src/main/scala/main.scala:10:1210|deffoo2:B of Any= foo
|^|Type argument Base.B does not conform to upper bound Base.this.A
It works in Scalac, and it works in Dotty if the definitions are moved to the object!
PS: note that it has nothing to do with object Base having the same name as class Base.
The text was updated successfully, but these errors were encountered:
Hmm, I guess there's a missing substitution somewhere. Here's a minimization:
classFoo {
classAtypeBla[X<:A] =X
}
classBarextendsFoo {
valy:Bla[A] =???// error: Type argument Bar.this.A does not conform to upper bound Foo.this.A
}
Uh oh!
There was an error while loading. Please reload this page.
See the scastie.
The code is reproduced below:
Fails with:
It works in Scalac, and it works in Dotty if the definitions are moved to the object!
PS: note that it has nothing to do with object
Base
having the same name as classBase
.The text was updated successfully, but these errors were encountered: