@@ -1000,7 +1000,7 @@ class Typer extends Namer
10001000 |because it has internal parameter dependencies,
10011001 |position = ${tree.span}, raw type = ${mt.toString}""" ) // !!! DEBUG. Eventually, convert to an error?
10021002 }
1003- else if ((tree.tpt `eq` untpd.ContextualEmptyTree ) && mt.paramNames.isEmpty)
1003+ else if ((tree.tpt `eq` untpd.GivenClosureEmptyTree ) && mt.paramNames.isEmpty)
10041004 // Note implicitness of function in target type since there are no method parameters that indicate it.
10051005 TypeTree (defn.FunctionOf (Nil , mt.resType, isGiven = true , isErased = false ))
10061006 else
@@ -2179,10 +2179,10 @@ class Typer extends Namer
21792179 val ifpt = defn.asImplicitFunctionType(pt)
21802180 val result = if (ifpt.exists &&
21812181 xtree.isTerm &&
2182- ! untpd.isContextualClosure (xtree) &&
2182+ ! untpd.isGivenClosure (xtree) &&
21832183 ! ctx.mode.is(Mode .Pattern ) &&
21842184 ! ctx.isAfterTyper)
2185- makeContextualFunction (xtree, ifpt)
2185+ makeGivenFunction (xtree, ifpt)
21862186 else xtree match {
21872187 case xtree : untpd.NameTree => typedNamed(xtree, pt)
21882188 case xtree => typedUnnamed(xtree)
@@ -2203,9 +2203,9 @@ class Typer extends Namer
22032203 tree
22042204 }
22052205
2206- protected def makeContextualFunction (tree : untpd.Tree , pt : Type )(implicit ctx : Context ): Tree = {
2206+ protected def makeGivenFunction (tree : untpd.Tree , pt : Type )(implicit ctx : Context ): Tree = {
22072207 val defn .FunctionOf (formals, _, true , _) = pt.dropDependentRefinement
2208- val ifun = desugar.makeContextualFunction (formals, tree, defn.isErasedFunctionType(pt))
2208+ val ifun = desugar.makeGivenFunction (formals, tree, defn.isErasedFunctionType(pt))
22092209 typr.println(i " make contextual function $tree / $pt ---> $ifun" )
22102210 typed(ifun, pt)
22112211 }
@@ -2779,7 +2779,7 @@ class Typer extends Namer
27792779 def adaptNoArgsOther (wtp : Type ): Tree = {
27802780 ctx.typeComparer.GADTused = false
27812781 if (isImplicitFunctionRef(wtp) &&
2782- ! untpd.isContextualClosure (tree) &&
2782+ ! untpd.isGivenClosure (tree) &&
27832783 ! isApplyProto(pt) &&
27842784 ! ctx.mode.is(Mode .Pattern ) &&
27852785 ! ctx.isAfterTyper) {
0 commit comments