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 9a07924 commit f09cae9Copy full SHA for f09cae9
compiler/src/dotty/tools/dotc/typer/Typer.scala
@@ -515,7 +515,7 @@ class Typer extends Namer
515
case templ: untpd.Template =>
516
import untpd._
517
var templ1 = templ
518
- def isEligible(tp: Type) = tp.exists && !tp.typeSymbol.is(Final)
+ def isEligible(tp: Type) = tp.exists && !tp.typeSymbol.is(Final) && tp.classSymbol != defn.AnyClass
519
if (templ1.parents.isEmpty &&
520
isFullyDefined(pt, ForceDegree.noBottom) &&
521
isEligible(pt.underlyingClassRef(refinementOK = false)))
0 commit comments