@@ -1731,7 +1731,7 @@ trait Applications extends Compatibility {
1731
1731
def apply (t : Type ) = t match {
1732
1732
case t @ AppliedType (tycon, args) =>
1733
1733
def mapArg (arg : Type , tparam : TypeParamInfo ) =
1734
- if (variance > 0 && tparam.paramVarianceSign < 0 ) defn.FunctionOf (arg :: Nil , defn.UnitType )
1734
+ if (variance > 0 && tparam.paramVarianceSign < 0 ) defn.FunctionNOf (arg :: Nil , defn.UnitType )
1735
1735
else arg
1736
1736
mapOver(t.derivedAppliedType(tycon, args.zipWithConserve(tycon.typeParams)(mapArg)))
1737
1737
case _ => mapOver(t)
@@ -1964,7 +1964,7 @@ trait Applications extends Compatibility {
1964
1964
/** The shape of given tree as a type; cannot handle named arguments. */
1965
1965
def typeShape (tree : untpd.Tree ): Type = tree match {
1966
1966
case untpd.Function (args, body) =>
1967
- defn.FunctionOf (
1967
+ defn.FunctionNOf (
1968
1968
args.map(Function .const(defn.AnyType )), typeShape(body),
1969
1969
isContextual = untpd.isContextualClosure(tree))
1970
1970
case Match (EmptyTree , _) =>
@@ -2004,8 +2004,8 @@ trait Applications extends Compatibility {
2004
2004
def paramCount (ref : TermRef ) =
2005
2005
val formals = ref.widen.firstParamTypes
2006
2006
if formals.length > idx then
2007
- formals(idx) match
2008
- case defn.FunctionOf (args, _, _) => args.length
2007
+ formals(idx).dealias match
2008
+ case defn.FunctionNOf (args, _, _) => args.length
2009
2009
case _ => - 1
2010
2010
else - 1
2011
2011
@@ -2090,8 +2090,8 @@ trait Applications extends Compatibility {
2090
2090
else resolveMapped(alts1, _.widen.appliedTo(targs1.tpes), pt1)
2091
2091
2092
2092
case pt =>
2093
- val compat0 = pt match
2094
- case defn.FunctionOf (args, resType, _) =>
2093
+ val compat0 = pt.dealias match
2094
+ case defn.FunctionNOf (args, resType, _) =>
2095
2095
narrowByTypes(alts, args, resType)
2096
2096
case _ =>
2097
2097
Nil
@@ -2280,7 +2280,7 @@ trait Applications extends Compatibility {
2280
2280
false
2281
2281
val commonFormal =
2282
2282
if (isPartial) defn.PartialFunctionOf (commonParamTypes.head, WildcardType )
2283
- else defn.FunctionOf (commonParamTypes, WildcardType , isContextual = untpd.isContextualClosure(arg))
2283
+ else defn.FunctionNOf (commonParamTypes, WildcardType , isContextual = untpd.isContextualClosure(arg))
2284
2284
overload.println(i " pretype arg $arg with expected type $commonFormal" )
2285
2285
if (commonParamTypes.forall(isFullyDefined(_, ForceDegree .flipBottom)))
2286
2286
withMode(Mode .ImplicitsEnabled ) {
0 commit comments