File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2086,7 +2086,7 @@ class Typer extends Namer
20862086 /** Checks if one of the decls is a type with the same name as class type member in selfType */
20872087 def classExistsOnSelf (decls : Scope , self : tpd.ValDef ): Boolean = {
20882088 val selfType = self.tpt.tpe
2089- if (! selfType.exists || (selfType.classSymbol eq cls)) false
2089+ if (! selfType.exists || (selfType.widen. classSymbol eq cls)) false
20902090 else {
20912091 def memberInSelfButNotThis (decl : Symbol ) =
20922092 selfType.member(decl.name).symbol.filter(other => other.isClass && other.owner != cls)
Original file line number Diff line number Diff line change @@ -7,6 +7,6 @@ object O2 {
77}
88
99object O3 { // error
10- opaque type R [X ] = T [X ]
10+ opaque type R [X ] = T [X ] // error
1111 opaque type T [X ] = R [X ] // error
1212}
Original file line number Diff line number Diff line change @@ -2,5 +2,5 @@ trait Foo[F <: Foo[F]]
22class Bar extends Foo [Bar ]
33
44object Q { // error: recursion limit exceeded
5- opaque type X <: Foo [X ] = Bar // error: out of bounds
5+ opaque type X <: Foo [X ] = Bar // error: out of bounds // error
66}
You can’t perform that action at this time.
0 commit comments