@@ -1731,7 +1731,7 @@ trait Applications extends Compatibility {
17311731 def apply (t : Type ) = t match {
17321732 case t @ AppliedType (tycon, args) =>
17331733 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 )
17351735 else arg
17361736 mapOver(t.derivedAppliedType(tycon, args.zipWithConserve(tycon.typeParams)(mapArg)))
17371737 case _ => mapOver(t)
@@ -1964,7 +1964,7 @@ trait Applications extends Compatibility {
19641964 /** The shape of given tree as a type; cannot handle named arguments. */
19651965 def typeShape (tree : untpd.Tree ): Type = tree match {
19661966 case untpd.Function (args, body) =>
1967- defn.FunctionOf (
1967+ defn.FunctionNOf (
19681968 args.map(Function .const(defn.AnyType )), typeShape(body),
19691969 isContextual = untpd.isContextualClosure(tree))
19701970 case Match (EmptyTree , _) =>
@@ -2004,8 +2004,8 @@ trait Applications extends Compatibility {
20042004 def paramCount (ref : TermRef ) =
20052005 val formals = ref.widen.firstParamTypes
20062006 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
20092009 case _ => - 1
20102010 else - 1
20112011
@@ -2090,8 +2090,8 @@ trait Applications extends Compatibility {
20902090 else resolveMapped(alts1, _.widen.appliedTo(targs1.tpes), pt1)
20912091
20922092 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, _) =>
20952095 narrowByTypes(alts, args, resType)
20962096 case _ =>
20972097 Nil
@@ -2280,7 +2280,7 @@ trait Applications extends Compatibility {
22802280 false
22812281 val commonFormal =
22822282 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))
22842284 overload.println(i " pretype arg $arg with expected type $commonFormal" )
22852285 if (commonParamTypes.forall(isFullyDefined(_, ForceDegree .flipBottom)))
22862286 withMode(Mode .ImplicitsEnabled ) {
0 commit comments