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 00c51d5 commit 5887fabCopy full SHA for 5887fab
compiler/src/dotty/tools/dotc/typer/Typer.scala
@@ -444,9 +444,10 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
444
case templ: untpd.Template =>
445
import untpd._
446
var templ1 = templ
447
+ def isEligible(tp: Type) = tp.exists && !tp.typeSymbol.is(Final)
448
if (templ1.parents.isEmpty &&
449
isFullyDefined(pt, ForceDegree.noBottom) &&
- pt.underlyingClassRef(refinementOK = false).exists)
450
+ isEligible(pt.underlyingClassRef(refinementOK = false)))
451
templ1 = cpy.Template(templ)(parents = untpd.TypeTree(pt) :: Nil)
452
templ1.parents foreach {
453
case parent: RefTree =>
0 commit comments