@@ -861,22 +861,17 @@ class Definitions {
861861
862862 lazy val TupleType = mkArityArray(" scala.Tuple" , MaxTupleArity , 2 )
863863
864- def FunctionClass (n : Int , isImplicit : Boolean = false , isErased : Boolean = false )(implicit ctx : Context ) = {
865- if (isImplicit && isErased) {
866- require(n > 0 )
864+ def FunctionClass (n : Int , isImplicit : Boolean = false , isErased : Boolean = false )(implicit ctx : Context ) =
865+ if (isImplicit && isErased)
867866 ctx.requiredClass(" scala.ErasedImplicitFunction" + n.toString)
868- }
869- else if (isImplicit) {
870- require(n > 0 )
867+ else if (isImplicit)
871868 ctx.requiredClass(" scala.ImplicitFunction" + n.toString)
872- }
873- else if (isErased) {
874- require(n > 0 )
869+ else if (isErased)
875870 ctx.requiredClass(" scala.ErasedFunction" + n.toString)
876- }
877- else if (n <= MaxImplementedFunctionArity ) FunctionClassPerRun ()(ctx)(n)
878- else ctx.requiredClass( " scala.Function " + n.toString)
879- }
871+ else if (n <= MaxImplementedFunctionArity )
872+ FunctionClassPerRun ()(ctx)(n)
873+ else
874+ ctx.requiredClass( " scala.Function " + n.toString)
880875
881876 lazy val Function0_applyR = ImplementedFunctionType (0 ).symbol.requiredMethodRef(nme.apply)
882877 def Function0_apply (implicit ctx : Context ) = Function0_applyR .symbol
@@ -907,14 +902,14 @@ class Definitions {
907902
908903 /** Is a function class.
909904 * - FunctionN for N >= 0
910- * - ImplicitFunctionN for N > 0
905+ * - ImplicitFunctionN for N >= 0
911906 * - ErasedFunctionN for N > 0
912907 * - ErasedImplicitFunctionN for N > 0
913908 */
914909 def isFunctionClass (cls : Symbol ) = scalaClassName(cls).isFunction
915910
916911 /** Is an implicit function class.
917- * - ImplicitFunctionN for N > 0
912+ * - ImplicitFunctionN for N >= 0
918913 * - ErasedImplicitFunctionN for N > 0
919914 */
920915 def isImplicitFunctionClass (cls : Symbol ) = scalaClassName(cls).isImplicitFunction
@@ -948,7 +943,7 @@ class Definitions {
948943 * - FunctionN for N > 22 becomes FunctionXXL
949944 * - FunctionN for 22 > N >= 0 remains as FunctionN
950945 * - ImplicitFunctionN for N > 22 becomes FunctionXXL
951- * - ImplicitFunctionN for 22 > N >= 0 becomes FunctionN
946+ * - ImplicitFunctionN for N <= 22 becomes FunctionN
952947 * - ErasedFunctionN becomes Function0
953948 * - ImplicitErasedFunctionN becomes Function0
954949 * - anything else becomes a NoSymbol
@@ -965,7 +960,7 @@ class Definitions {
965960 * - FunctionN for N > 22 becomes FunctionXXL
966961 * - FunctionN for 22 > N >= 0 remains as FunctionN
967962 * - ImplicitFunctionN for N > 22 becomes FunctionXXL
968- * - ImplicitFunctionN for 22 > N >= 0 becomes FunctionN
963+ * - ImplicitFunctionN for N <= 22 becomes FunctionN
969964 * - ErasedFunctionN becomes Function0
970965 * - ImplicitErasedFunctionN becomes Function0
971966 * - anything else becomes a NoType
0 commit comments