File tree 3 files changed +3
-3
lines changed
compiler/src/dotty/tools/dotc/typer
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
2086
2086
/** Checks if one of the decls is a type with the same name as class type member in selfType */
2087
2087
def classExistsOnSelf (decls : Scope , self : tpd.ValDef ): Boolean = {
2088
2088
val selfType = self.tpt.tpe
2089
- if (! selfType.exists || (selfType.classSymbol eq cls)) false
2089
+ if (! selfType.exists || (selfType.widen. classSymbol eq cls)) false
2090
2090
else {
2091
2091
def memberInSelfButNotThis (decl : Symbol ) =
2092
2092
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 {
7
7
}
8
8
9
9
object O3 { // error
10
- opaque type R [X ] = T [X ]
10
+ opaque type R [X ] = T [X ] // error
11
11
opaque type T [X ] = R [X ] // error
12
12
}
Original file line number Diff line number Diff line change @@ -2,5 +2,5 @@ trait Foo[F <: Foo[F]]
2
2
class Bar extends Foo [Bar ]
3
3
4
4
object 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
6
6
}
You can’t perform that action at this time.
0 commit comments