@@ -1717,7 +1717,7 @@ trait Applications extends Compatibility {
17171717 def apply (t : Type ) = t match {
17181718 case t @ AppliedType (tycon, args) =>
17191719 def mapArg (arg : Type , tparam : TypeParamInfo ) =
1720- if (variance > 0 && tparam.paramVarianceSign < 0 ) defn.FunctionOf (arg :: Nil , defn.UnitType )
1720+ if (variance > 0 && tparam.paramVarianceSign < 0 ) defn.FunctionNOf (arg :: Nil , defn.UnitType )
17211721 else arg
17221722 mapOver(t.derivedAppliedType(tycon, args.zipWithConserve(tycon.typeParams)(mapArg)))
17231723 case _ => mapOver(t)
@@ -1944,7 +1944,7 @@ trait Applications extends Compatibility {
19441944 /** The shape of given tree as a type; cannot handle named arguments. */
19451945 def typeShape (tree : untpd.Tree ): Type = tree match {
19461946 case untpd.Function (args, body) =>
1947- defn.FunctionOf (
1947+ defn.FunctionNOf (
19481948 args.map(Function .const(defn.AnyType )), typeShape(body),
19491949 isContextual = untpd.isContextualClosure(tree))
19501950 case Match (EmptyTree , _) =>
@@ -1984,8 +1984,8 @@ trait Applications extends Compatibility {
19841984 def paramCount (ref : TermRef ) =
19851985 val formals = ref.widen.firstParamTypes
19861986 if formals.length > idx then
1987- formals(idx) match
1988- case defn.FunctionOf (args, _, _) => args.length
1987+ formals(idx).dealias match
1988+ case defn.FunctionNOf (args, _, _) => args.length
19891989 case _ => - 1
19901990 else - 1
19911991
@@ -2070,8 +2070,8 @@ trait Applications extends Compatibility {
20702070 else resolveMapped(alts1, _.widen.appliedTo(targs1.tpes), pt1)
20712071
20722072 case pt =>
2073- val compat0 = pt match
2074- case defn.FunctionOf (args, resType, _) =>
2073+ val compat0 = pt.dealias match
2074+ case defn.FunctionNOf (args, resType, _) =>
20752075 narrowByTypes(alts, args, resType)
20762076 case _ =>
20772077 Nil
@@ -2260,7 +2260,7 @@ trait Applications extends Compatibility {
22602260 false
22612261 val commonFormal =
22622262 if (isPartial) defn.PartialFunctionOf (commonParamTypes.head, WildcardType )
2263- else defn.FunctionOf (commonParamTypes, WildcardType , isContextual = untpd.isContextualClosure(arg))
2263+ else defn.FunctionNOf (commonParamTypes, WildcardType , isContextual = untpd.isContextualClosure(arg))
22642264 overload.println(i " pretype arg $arg with expected type $commonFormal" )
22652265 if (commonParamTypes.forall(isFullyDefined(_, ForceDegree .flipBottom)))
22662266 withMode(Mode .ImplicitsEnabled ) {
0 commit comments