File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -147,13 +147,15 @@ class ElimRepeated extends MiniPhase with InfoTransformer { thisPhase =>
147147 /** Is this the type of a method that has a repeated parameter type as
148148 * its last parameter in the last parameter list?
149149 */
150- private def isValidJavaVarArgs (t : Type )(using Context ): Boolean = t match
150+ private def isValidJavaVarArgs (tp : Type )(using Context ): Boolean = tp match
151151 case mt : MethodType =>
152152 val initp :+ lastp = mt.paramInfoss
153153 initp.forall(_.forall(! _.isRepeatedParam)) &&
154154 lastp.nonEmpty &&
155155 lastp.init.forall(! _.isRepeatedParam) &&
156156 lastp.last.isRepeatedParam
157+ case pt : PolyType =>
158+ isValidJavaVarArgs(pt.resultType)
157159 case _ => false
158160
159161
You can’t perform that action at this time.
0 commit comments