File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -1874,22 +1874,19 @@ object Types {
18741874 /** Turn type into a function type.
18751875 * @pre this is a method type without parameter dependencies.
18761876 * @param isJava translate repeated params as as java `Array`s?
1877- * @param dropLast the number of trailing parameters that should be dropped
1878- * when forming the function type.
18791877 * @param alwaysDependent if true, always create a dependent function type.
18801878 */
1881- def toFunctionType (isJava : Boolean = false , dropLast : Int = 0 , alwaysDependent : Boolean = false )(using Context ): Type = this match {
1879+ def toFunctionType (isJava : Boolean = false , alwaysDependent : Boolean = false )(using Context ): Type = this match {
18821880 case mt : MethodType =>
18831881 assert(! mt.isParamDependent)
18841882 def nonDependentFunType =
1885- val formals1 = if (dropLast == 0 ) mt.paramInfos else mt.paramInfos dropRight dropLast
18861883 val isContextual = mt.isContextualMethod && ! ctx.erasedTypes
18871884 val result1 = mt.nonDependentResultApprox match {
18881885 case res : MethodType => res.toFunctionType(isJava)
18891886 case res => res
18901887 }
18911888 defn.FunctionOf (
1892- formals1 mapConserve (_.translateFromRepeated(toArray = isJava)),
1889+ mt.paramInfos. mapConserve(_.translateFromRepeated(toArray = isJava)),
18931890 result1, isContextual)
18941891 if mt.hasErasedParams then
18951892 defn.PolyFunctionOf (mt)
You can’t perform that action at this time.
0 commit comments