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.
1 parent 1bd3ed1 commit 357cc3aCopy full SHA for 357cc3a
compiler/src/dotty/tools/dotc/core/Types.scala
@@ -500,6 +500,13 @@ object Types {
500
case tp: TypeRef =>
501
val sym = tp.symbol
502
if (sym.isClass) sym else tp.superType.classSymbol
503
+ case tp: AppliedType =>
504
+ val cls = tp.underlying.classSymbol
505
+ if cls == defn.AnyClass
506
+ // in that case, `tp` could be a type alias the reduces to an argument;
507
+ // need to go through dealias
508
+ then tp.superType.classSymbol
509
+ else cls
510
case tp: TypeProxy =>
511
tp.superType.classSymbol
512
case tp: ClassInfo =>
0 commit comments