@@ -130,7 +130,7 @@ class Definitions {
130130 val resParamRef = enterTypeParam(cls, paramNamePrefix ++ " R" , Covariant , decls).typeRef
131131 val methodType = MethodType .companion(
132132 isJava = false ,
133- isContextual = name.isImplicitFunction,
133+ isGiven = name.isImplicitFunction,
134134 isOldImplicit = false ,
135135 isErased = name.isErasedFunction)
136136 decls.enter(newMethod(cls, nme.apply, methodType(argParamRefs, resParamRef), Deferred ))
@@ -907,8 +907,8 @@ class Definitions {
907907 sym.owner.linkedClass.typeRef
908908
909909 object FunctionOf {
910- def apply (args : List [Type ], resultType : Type , isContextual : Boolean = false , isErased : Boolean = false )(implicit ctx : Context ): Type =
911- FunctionType (args.length, isContextual , isErased).appliedTo(args ::: resultType :: Nil )
910+ def apply (args : List [Type ], resultType : Type , isGiven : Boolean = false , isErased : Boolean = false )(implicit ctx : Context ): Type =
911+ FunctionType (args.length, isGiven , isErased).appliedTo(args ::: resultType :: Nil )
912912 def unapply (ft : Type )(implicit ctx : Context ): Option [(List [Type ], Type , Boolean , Boolean )] = {
913913 val tsym = ft.typeSymbol
914914 if (isFunctionClass(tsym)) {
@@ -1013,10 +1013,10 @@ class Definitions {
10131013
10141014 lazy val TupleType : Array [TypeRef ] = mkArityArray(" scala.Tuple" , MaxTupleArity , 1 )
10151015
1016- def FunctionClass (n : Int , isContextual : Boolean = false , isErased : Boolean = false )(implicit ctx : Context ): Symbol =
1017- if (isContextual && isErased)
1016+ def FunctionClass (n : Int , isGiven : Boolean = false , isErased : Boolean = false )(implicit ctx : Context ): Symbol =
1017+ if (isGiven && isErased)
10181018 ctx.requiredClass(" scala.ErasedImplicitFunction" + n.toString)
1019- else if (isContextual )
1019+ else if (isGiven )
10201020 ctx.requiredClass(" scala.ImplicitFunction" + n.toString)
10211021 else if (isErased)
10221022 ctx.requiredClass(" scala.ErasedFunction" + n.toString)
@@ -1028,9 +1028,9 @@ class Definitions {
10281028 lazy val Function0_applyR : TermRef = ImplementedFunctionType (0 ).symbol.requiredMethodRef(nme.apply)
10291029 def Function0_apply (implicit ctx : Context ): Symbol = Function0_applyR .symbol
10301030
1031- def FunctionType (n : Int , isContextual : Boolean = false , isErased : Boolean = false )(implicit ctx : Context ): TypeRef =
1032- if (n <= MaxImplementedFunctionArity && (! isContextual || ctx.erasedTypes) && ! isErased) ImplementedFunctionType (n)
1033- else FunctionClass (n, isContextual , isErased).typeRef
1031+ def FunctionType (n : Int , isGiven : Boolean = false , isErased : Boolean = false )(implicit ctx : Context ): TypeRef =
1032+ if (n <= MaxImplementedFunctionArity && (! isGiven || ctx.erasedTypes) && ! isErased) ImplementedFunctionType (n)
1033+ else FunctionClass (n, isGiven , isErased).typeRef
10341034
10351035 /** If `cls` is a class in the scala package, its name, otherwise EmptyTypeName */
10361036 def scalaClassName (cls : Symbol )(implicit ctx : Context ): TypeName =
0 commit comments