Я попытался определить следующее trait Function255
:
trait Function255[-T1, -T2, -T3, -T4, -T5, -T6, -T7, -T8, -T9, -T10, -T11, -T12, -T13, -T14, -T15, -T16, -T17, -T18, -T19, -T20, -T21, -T22, -T23, -T24, -T25, -T26, -T27, -T28, -T29, -T30, -T31, -T32, -T33, -T34, -T35, -T36, -T37, -T38, -T39, -T40, -T41, -T42, -T43, -T44, -T45, -T46, -T47, -T48, -T49, -T50, -T51, -T52, -T53, -T54, -T55, -T56, -T57, -T58, -T59, -T60, -T61, -T62, -T63, -T64, -T65, -T66, -T67, -T68, -T69, -T70, -T71, -T72, -T73, -T74, -T75, -T76, -T77, -T78, -T79, -T80, -T81, -T82, -T83, -T84, -T85, -T86, -T87, -T88, -T89, -T90, -T91, -T92, -T93, -T94, -T95, -T96, -T97, -T98, -T99, -T100, T101, T102, T103, T104, T105, T106, T107, T108, T109, T110, T111, T112, T113, T114, T115, T116, T117, T118, T119, T120, T121, T122, T123, T124, T125, T126, T127, T128, T129, T130, T131, T132, T133, T134, T135, T136, T137, T138, T139, T140, T141, T142, T143, T144, T145, T146, T147, T148, T149, T150, T151, T152, T153, T154, T155, T156, T157, T158, T159, T160, T161, T162, T163, T164, T165, T166, T167, T168, T169, T170, T171, T172, T173, T174, T175, T176, T177, T178, T179, T180, T181, T182, T183, T184, T185, T186, T187, T188, T189, T190, T191, T192, T193, T194, T195, T196, T197, T198, T199, T200, T201, T202, T203, T204, T205, T206, T207, T208, T209, T210, T211, T212, T213, T214, T215, T216, T217, T218, T219, T220, T221, T222, T223, T224, T225, T226, T227, T228, T229, T230, T231, T232, T233, T234, T235, T236, T237, T238, T239, T240, T241, T242, T243, T244, T245, T246, T247, T248, T249, T250, T251, T252, T253, T254, T255, +R] extends AnyRef { self =>
def apply(v1: T1, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6, v7: T7, v8: T8, v9: T9, v10: T10, v11: T11, v12: T12, v13: T13, v14: T14, v15: T15, v16: T16, v17: T17, v18: T18, v19: T19, v20: T20, v21: T21, v22: T22, v23: T23, v24: T24, v25: T25, v26: T26, v27: T27, v28: T28, v29: T29, v30: T30, v31: T31, v32: T32, v33: T33, v34: T34, v35: T35, v36: T36, v37: T37, v38: T38, v39: T39, v40: T40, v41: T41, v42: T42, v43: T43, v44: T44, v45: T45, v46: T46, v47: T47, v48: T48, v49: T49, v50: T50, v51: T51, v52: T52, v53: T53, v54: T54, v55: T55, v56: T56, v57: T57, v58: T58, v59: T59, v60: T60, v61: T61, v62: T62, v63: T63, v64: T64, v65: T65, v66: T66, v67: T67, v68: T68, v69: T69, v70: T70, v71: T71, v72: T72, v73: T73, v74: T74, v75: T75, v76: T76, v77: T77, v78: T78, v79: T79, v80: T80, v81: T81, v82: T82, v83: T83, v84: T84, v85: T85, v86: T86, v87: T87, v88: T88, v89: T89, v90: T90, v91: T91, v92: T92, v93: T93, v94: T94, v95: T95, v96: T96, v97: T97, v98: T98, v99: T99, v100: T100, v101: T101, v102: T102, v103: T103, v104: T104, v105: T105, v106: T106, v107: T107, v108: T108, v109: T109, v110: T110, v111: T111, v112: T112, v113: T113, v114: T114, v115: T115, v116: T116, v117: T117, v118: T118, v119: T119, v120: T120, v121: T121, v122: T122, v123: T123, v124: T124, v125: T125, v126: T126, v127: T127, v128: T128, v129: T129, v130: T130, v131: T131, v132: T132, v133: T133, v134: T134, v135: T135, v136: T136, v137: T137, v138: T138, v139: T139, v140: T140, v141: T141, v142: T142, v143: T143, v144: T144, v145: T145, v146: T146, v147: T147, v148: T148, v149: T149, v150: T150, v151: T151, v152: T152, v153: T153, v154: T154, v155: T155, v156: T156, v157: T157, v158: T158, v159: T159, v160: T160, v161: T161, v162: T162, v163: T163, v164: T164, v165: T165, v166: T166, v167: T167, v168: T168, v169: T169, v170: T170, v171: T171, v172: T172, v173: T173, v174: T174, v175: T175, v176: T176, v177: T177, v178: T178, v179: T179, v180: T180, v181: T181, v182: T182, v183: T183, v184: T184, v185: T185, v186: T186, v187: T187, v188: T188, v189: T189, v190: T190, v191: T191, v192: T192, v193: T193, v194: T194, v195: T195, v196: T196, v197: T197, v198: T198, v199: T199, v200: T200, v201: T201, v202: T202, v203: T203, v204: T204, v205: T205, v206: T206, v207: T207, v208: T208, v209: T209, v210: T210, v211: T211, v212: T212, v213: T213, v214: T214, v215: T215, v216: T216, v217: T217, v218: T218, v219: T219, v220: T220, v221: T221, v222: T222, v223: T223, v224: T224, v225: T225, v226: T226, v227: T227, v228: T228, v229: T229, v230: T230, v231: T231, v232: T232, v233: T233, v234: T234, v235: T235, v236: T236, v237: T237, v238: T238, v239: T239, v240: T240, v241: T241, v242: T242, v243: T243, v244: T244, v245: T245, v246: T246, v247: T247, v248: T248, v249: T249, v250: T250, v251: T251, v252: T252, v253: T253, v254: T254, v255: T255): R
override def toString(): String = "<function255>"
}
, и компилятор жалуется на
Platform restriction: a parameter list's length cannot exceed 254.
, поэтому кажется, что ограничение составляет 254. Действительно trait Function254
компилируетсяштрафа.
Если параметры неявно такие, как таккажется отброшено на Функция сброса 22 limit # 1758 :
Пределы 22 для максимального количества параметров типов функций и максимального числаиз полей в типах кортежей были удалены.
Функции теперь могут иметь произвольное количество параметров.Функции за пределами Function22 стираются до новой черты scala.FunctionXXL
, а кортежи за пределами Tuple22 стираются до новой черты scala.TupleXXL.Оба они реализованы с использованием массивов.