We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4764ae1 + c0341d3 commit 118cda2Copy full SHA for 118cda2
compiler/src/dotty/tools/dotc/core/Types.scala
@@ -275,7 +275,7 @@ object Types {
275
@tailrec def loop(tp: Type): Boolean = tp match {
276
case tp: TypeRef =>
277
val sym = tp.symbol
278
- if (sym.isClass) sym == defn.AnyKindClass else loop(tp.superType)
+ if (sym.isClass) sym == defn.AnyKindClass else loop(tp.translucentSuperType)
279
case tp: TypeProxy =>
280
loop(tp.underlying)
281
case _ =>
tests/neg/i8219.scala
@@ -0,0 +1,4 @@
1
+object O{
2
+ opaque type T[X <: AnyKind] = X
3
+}
4
+def m(x: O.T[AnyKind]) = x // error
0 commit comments