Skip to content

Commit d985eb7

Browse files
committed
Polishings
1 parent afacc72 commit d985eb7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

compiler/src/dotty/tools/dotc/transform/Erasure.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,7 @@ object Erasure {
528528
}
529529
}
530530

531+
/** The type of an Apply node which might still be missing some arguments */
531532
private def applyResultType(mt: MethodType, args: List[Tree], bunchArgs: Boolean = false)(using Context): Type =
532533
if bunchArgs || mt.paramNames.length <= args.length then
533534
mt.resultType
@@ -551,9 +552,9 @@ object Erasure {
551552
fun1.tpe.widen match
552553
case mt: MethodType =>
553554
val bunchArgs = mt.paramInfos match
554-
case JavaArrayType(elemType) :: Nil => // pre-test for efficiency
555-
elemType.isRef(defn.ObjectClass) // pre-test for efficiency
556-
&& origFunType.paramInfoss.flatten.length > MaxImplementedFunctionArity //
555+
case JavaArrayType(elemType) :: Nil =>
556+
elemType.isRef(defn.ObjectClass)
557+
&& origFunType.paramInfoss.flatten.length > MaxImplementedFunctionArity
557558
case _ => false
558559
val args1 =
559560
if bunchArgs then args0.map(typedExpr(_, defn.ObjectType))

0 commit comments

Comments
 (0)