@@ -1724,7 +1724,7 @@ trait Applications extends Compatibility {
17241724 def apply (t : Type ) = t match {
17251725 case t @ AppliedType (tycon, args) =>
17261726 def mapArg (arg : Type , tparam : TypeParamInfo ) =
1727- if (variance > 0 && tparam.paramVarianceSign < 0 ) defn.FunctionOf (arg :: Nil , defn.UnitType )
1727+ if (variance > 0 && tparam.paramVarianceSign < 0 ) defn.FunctionNOf (arg :: Nil , defn.UnitType )
17281728 else arg
17291729 mapOver(t.derivedAppliedType(tycon, args.zipWithConserve(tycon.typeParams)(mapArg)))
17301730 case _ => mapOver(t)
@@ -1951,7 +1951,7 @@ trait Applications extends Compatibility {
19511951 /** The shape of given tree as a type; cannot handle named arguments. */
19521952 def typeShape (tree : untpd.Tree ): Type = tree match {
19531953 case untpd.Function (args, body) =>
1954- defn.FunctionOf (
1954+ defn.FunctionNOf (
19551955 args.map(Function .const(defn.AnyType )), typeShape(body),
19561956 isContextual = untpd.isContextualClosure(tree))
19571957 case Match (EmptyTree , _) =>
@@ -1991,8 +1991,8 @@ trait Applications extends Compatibility {
19911991 def paramCount (ref : TermRef ) =
19921992 val formals = ref.widen.firstParamTypes
19931993 if formals.length > idx then
1994- formals(idx) match
1995- case defn.FunctionOf (args, _, _) => args.length
1994+ formals(idx).dealias match
1995+ case defn.FunctionNOf (args, _, _) => args.length
19961996 case _ => - 1
19971997 else - 1
19981998
@@ -2077,8 +2077,8 @@ trait Applications extends Compatibility {
20772077 else resolveMapped(alts1, _.widen.appliedTo(targs1.tpes), pt1)
20782078
20792079 case pt =>
2080- val compat0 = pt match
2081- case defn.FunctionOf (args, resType, _) =>
2080+ val compat0 = pt.dealias match
2081+ case defn.FunctionNOf (args, resType, _) =>
20822082 narrowByTypes(alts, args, resType)
20832083 case _ =>
20842084 Nil
@@ -2266,7 +2266,7 @@ trait Applications extends Compatibility {
22662266 false
22672267 val commonFormal =
22682268 if (isPartial) defn.PartialFunctionOf (commonParamTypes.head, WildcardType )
2269- else defn.FunctionOf (commonParamTypes, WildcardType , isContextual = untpd.isContextualClosure(arg))
2269+ else defn.FunctionNOf (commonParamTypes, WildcardType , isContextual = untpd.isContextualClosure(arg))
22702270 overload.println(i " pretype arg $arg with expected type $commonFormal" )
22712271 if (commonParamTypes.forall(isFullyDefined(_, ForceDegree .flipBottom)))
22722272 withMode(Mode .ImplicitsEnabled ) {
0 commit comments