@@ -1717,7 +1717,7 @@ trait Applications extends Compatibility {
1717
1717
def apply (t : Type ) = t match {
1718
1718
case t @ AppliedType (tycon, args) =>
1719
1719
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 )
1721
1721
else arg
1722
1722
mapOver(t.derivedAppliedType(tycon, args.zipWithConserve(tycon.typeParams)(mapArg)))
1723
1723
case _ => mapOver(t)
@@ -1944,7 +1944,7 @@ trait Applications extends Compatibility {
1944
1944
/** The shape of given tree as a type; cannot handle named arguments. */
1945
1945
def typeShape (tree : untpd.Tree ): Type = tree match {
1946
1946
case untpd.Function (args, body) =>
1947
- defn.FunctionOf (
1947
+ defn.FunctionNOf (
1948
1948
args.map(Function .const(defn.AnyType )), typeShape(body),
1949
1949
isContextual = untpd.isContextualClosure(tree))
1950
1950
case Match (EmptyTree , _) =>
@@ -1984,8 +1984,8 @@ trait Applications extends Compatibility {
1984
1984
def paramCount (ref : TermRef ) =
1985
1985
val formals = ref.widen.firstParamTypes
1986
1986
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
1989
1989
case _ => - 1
1990
1990
else - 1
1991
1991
@@ -2070,8 +2070,8 @@ trait Applications extends Compatibility {
2070
2070
else resolveMapped(alts1, _.widen.appliedTo(targs1.tpes), pt1)
2071
2071
2072
2072
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, _) =>
2075
2075
narrowByTypes(alts, args, resType)
2076
2076
case _ =>
2077
2077
Nil
@@ -2260,7 +2260,7 @@ trait Applications extends Compatibility {
2260
2260
false
2261
2261
val commonFormal =
2262
2262
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))
2264
2264
overload.println(i " pretype arg $arg with expected type $commonFormal" )
2265
2265
if (commonParamTypes.forall(isFullyDefined(_, ForceDegree .flipBottom)))
2266
2266
withMode(Mode .ImplicitsEnabled ) {
0 commit comments