@@ -1851,8 +1851,7 @@ object Types {
1851
1851
val funType = defn.FunctionOf (
1852
1852
formals1 mapConserve (_.translateFromRepeated(toArray = isJava)),
1853
1853
result1, isContextual, erasedParams)
1854
- if alwaysDependent || mt.isResultDependent then
1855
- RefinedType (funType, nme.apply, mt)
1854
+ if alwaysDependent || mt.isResultDependent then RefinedType (funType, nme.apply, mt)
1856
1855
else funType
1857
1856
}
1858
1857
@@ -3702,7 +3701,7 @@ object Types {
3702
3701
val params = if (hasErasedParams)
3703
3702
tp.paramInfos
3704
3703
.zip(tp.erasedParams)
3705
- .flatMap((p, e) => if e then None else Some (p))
3704
+ .collect { case (param, isErased) if ! isErased => param }
3706
3705
else tp.paramInfos
3707
3706
resultSignature.prependTermParams(params, sourceLanguage)
3708
3707
case tp : PolyType =>
@@ -4053,7 +4052,7 @@ object Types {
4053
4052
}
4054
4053
4055
4054
object MethodType extends MethodTypeCompanion (" MethodType" ) {
4056
- def companion (isContextual : Boolean = false , isImplicit : Boolean = false , erasedParams : List [Boolean ] = List () ): MethodTypeCompanion =
4055
+ def companion (isContextual : Boolean = false , isImplicit : Boolean = false , erasedParams : List [Boolean ] = Nil ): MethodTypeCompanion =
4057
4056
val hasErased = erasedParams.contains(true )
4058
4057
if (isContextual)
4059
4058
if (hasErased) ErasedContextualMethodType (erasedParams) else ContextualMethodType
0 commit comments