@@ -1707,7 +1707,7 @@ trait Applications extends Compatibility {
17071707 def apply (t : Type ) = t match {
17081708 case t @ AppliedType (tycon, args) =>
17091709 def mapArg (arg : Type , tparam : TypeParamInfo ) =
1710- if (variance > 0 && tparam.paramVarianceSign < 0 ) defn.FunctionOf (arg :: Nil , defn.UnitType )
1710+ if (variance > 0 && tparam.paramVarianceSign < 0 ) defn.FunctionNOf (arg :: Nil , defn.UnitType )
17111711 else arg
17121712 mapOver(t.derivedAppliedType(tycon, args.zipWithConserve(tycon.typeParams)(mapArg)))
17131713 case _ => mapOver(t)
@@ -1934,7 +1934,7 @@ trait Applications extends Compatibility {
19341934 /** The shape of given tree as a type; cannot handle named arguments. */
19351935 def typeShape (tree : untpd.Tree ): Type = tree match {
19361936 case untpd.Function (args, body) =>
1937- defn.FunctionOf (
1937+ defn.FunctionNOf (
19381938 args.map(Function .const(defn.AnyType )), typeShape(body),
19391939 isContextual = untpd.isContextualClosure(tree))
19401940 case Match (EmptyTree , _) =>
@@ -1974,8 +1974,8 @@ trait Applications extends Compatibility {
19741974 def paramCount (ref : TermRef ) =
19751975 val formals = ref.widen.firstParamTypes
19761976 if formals.length > idx then
1977- formals(idx) match
1978- case defn.FunctionOf (args, _, _) => args.length
1977+ formals(idx).dealias match
1978+ case defn.FunctionNOf (args, _, _) => args.length
19791979 case _ => - 1
19801980 else - 1
19811981
@@ -2060,8 +2060,8 @@ trait Applications extends Compatibility {
20602060 else resolveMapped(alts1, _.widen.appliedTo(targs1.tpes), pt1)
20612061
20622062 case pt =>
2063- val compat0 = pt match
2064- case defn.FunctionOf (args, resType, _) =>
2063+ val compat0 = pt.dealias match
2064+ case defn.FunctionNOf (args, resType, _) =>
20652065 narrowByTypes(alts, args, resType)
20662066 case _ =>
20672067 Nil
@@ -2249,7 +2249,7 @@ trait Applications extends Compatibility {
22492249 false
22502250 val commonFormal =
22512251 if (isPartial) defn.PartialFunctionOf (commonParamTypes.head, WildcardType )
2252- else defn.FunctionOf (commonParamTypes, WildcardType , isContextual = untpd.isContextualClosure(arg))
2252+ else defn.FunctionNOf (commonParamTypes, WildcardType , isContextual = untpd.isContextualClosure(arg))
22532253 overload.println(i " pretype arg $arg with expected type $commonFormal" )
22542254 if (commonParamTypes.forall(isFullyDefined(_, ForceDegree .flipBottom)))
22552255 withMode(Mode .ImplicitsEnabled ) {
0 commit comments