@@ -1694,11 +1694,6 @@ class Namer { typer: Typer =>
1694
1694
case _ =>
1695
1695
approxTp
1696
1696
1697
- // println(s"final inherited for $sym: ${inherited.toString}") !!!
1698
- // println(s"owner = ${sym.owner}, decls = ${sym.owner.info.decls.show}")
1699
- // TODO Scala 3.1: only check for inline vals (no final ones)
1700
- def isInlineVal = sym.isOneOf(FinalOrInline , butNot = Method | Mutable )
1701
-
1702
1697
var rhsCtx = ctx.fresh.addMode(Mode .InferringReturnType )
1703
1698
if sym.isInlineMethod then rhsCtx = rhsCtx.addMode(Mode .InlineableBody )
1704
1699
if sym.is(ExtensionMethod ) then rhsCtx = rhsCtx.addMode(Mode .InExtensionMethod )
@@ -1732,7 +1727,7 @@ class Namer { typer: Typer =>
1732
1727
// don't strip @uncheckedVariance annot for default getters
1733
1728
TypeOps .simplify(tp.widenTermRefExpr,
1734
1729
if defaultTp.exists then TypeOps .SimplifyKeepUnchecked () else null ) match
1735
- case ctp : ConstantType if isInlineVal => ctp
1730
+ case ctp : ConstantType if sym. isInlineVal => ctp
1736
1731
case tp => TypeComparer .widenInferred(tp, pt)
1737
1732
1738
1733
// Replace aliases to Unit by Unit itself. If we leave the alias in
@@ -1743,7 +1738,7 @@ class Namer { typer: Typer =>
1743
1738
def lhsType = fullyDefinedType(cookedRhsType, " right-hand side" , mdef.span)
1744
1739
// if (sym.name.toString == "y") println(i"rhs = $rhsType, cooked = $cookedRhsType")
1745
1740
if (inherited.exists)
1746
- if ( isInlineVal) lhsType else inherited
1741
+ if sym. isInlineVal then lhsType else inherited
1747
1742
else {
1748
1743
if (sym.is(Implicit ))
1749
1744
mdef match {
0 commit comments