File tree 1 file changed +2
-5
lines changed
compiler/src/dotty/tools/dotc/core
1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -1874,22 +1874,19 @@ object Types {
1874
1874
/** Turn type into a function type.
1875
1875
* @pre this is a method type without parameter dependencies.
1876
1876
* @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.
1879
1877
* @param alwaysDependent if true, always create a dependent function type.
1880
1878
*/
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 {
1882
1880
case mt : MethodType =>
1883
1881
assert(! mt.isParamDependent)
1884
1882
def nonDependentFunType =
1885
- val formals1 = if (dropLast == 0 ) mt.paramInfos else mt.paramInfos dropRight dropLast
1886
1883
val isContextual = mt.isContextualMethod && ! ctx.erasedTypes
1887
1884
val result1 = mt.nonDependentResultApprox match {
1888
1885
case res : MethodType => res.toFunctionType(isJava)
1889
1886
case res => res
1890
1887
}
1891
1888
defn.FunctionOf (
1892
- formals1 mapConserve (_.translateFromRepeated(toArray = isJava)),
1889
+ mt.paramInfos. mapConserve(_.translateFromRepeated(toArray = isJava)),
1893
1890
result1, isContextual)
1894
1891
if mt.hasErasedParams then
1895
1892
defn.PolyFunctionOf (mt)
You can’t perform that action at this time.
0 commit comments