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
Previously, i9994.scala failed when compiled with `-Ythrough-tasty`
with:
7 | def foo: this.type = this
| ^
| error overriding method foo in trait Foo of type => (Bar.this : pkg.Bar);
| method foo of type => (Bar.this : pkg.Bar) has incompatible type
The two types were pretty-printed the same but were actually:
ExprType(ThisType(TypeRef(ThisType(TypeRef(ThisType(TypeRef(NoPrefix,module class <root>)),module class <empty>)),class Bar)))
and
ExprType(ThisType(TypeRef(ThisType(TypeRef(NoPrefix,module class <empty>)),class Bar)))
Fixed by explicitly handling subtyping between two
`ThisType` (previously we felt through to `fourthTry` were the type of
the lhs was widened).
0 commit comments