@@ -152,11 +152,8 @@ object MainProxies {
152152 * args,
153153 * "f",
154154 * "Lorem ipsum dolor sit amet consectetur adipiscing elit.",
155- * new scala.annotation.MainAnnotation.ParameterInfo("x", "S")
156- * .withDocumentation("my param x")
157- * .withAnnotations(new scala.main.Alias("myX")),
158- * new scala.annotation.MainAnnotation.ParameterInfo("ys", "T")
159- * .withDocumentation("all my params y")
155+ * new scala.annotation.MainAnnotation.ParameterInfo("x", "S", false, false, "my param x", Seq(new scala.main.Alias("myX")))
156+ * new scala.annotation.MainAnnotation.ParameterInfo("ys", "T", false, false, "all my params y", Seq())
160157 * )
161158 *
162159 * val args0: () => S = cmd.argGetter[S](0, None)
@@ -226,9 +223,7 @@ object MainProxies {
226223 *
227224 * A ParamInfo has the following shape
228225 * ```
229- * new scala.annotation.MainAnnotation.ParameterInfo("x", "S")
230- * .withDocumentation("my param x")
231- * .withAnnotations(new scala.main.Alias("myX"))
226+ * new scala.annotation.MainAnnotation.ParameterInfo("x", "S", false, false, "my param x", Seq(new scala.main.Alias("myX")))
232227 * ```
233228 */
234229 def parameterInfos (mt : MethodType ): List [Tree ] =
@@ -244,15 +239,15 @@ object MainProxies {
244239 val hasDefault = defaultValueSymbols.contains(idx)
245240 val isRepeated = formal.isRepeatedParam
246241 val paramDoc = documentation.argDocs.getOrElse(param, " " )
242+ val paramAnnots =
243+ val annotationTrees = paramAnnotations(idx).map(instantiateAnnotation).toList
244+ Apply (ref(defn.SeqModule .termRef), annotationTrees)
247245
248246 val constructorArgs = List (param, paramTypeStr, hasDefault, isRepeated, paramDoc)
249247 .map(value => Literal (Constant (value)))
250- val paramInfos =
251- New (TypeTree (defn.MainAnnotationParameterInfo .typeRef), List (constructorArgs))
252- val paramAnnots = paramAnnotations(idx)
253- if paramAnnots.nonEmpty then
254- paramInfos.withProperty(defn.MainAnnotationParameterInfo_withAnnotations , paramAnnots.map(instantiateAnnotation).toList)
255- else paramInfos
248+
249+ New (TypeTree (defn.MainAnnotationParameterInfo .typeRef), List (constructorArgs :+ paramAnnots))
250+
256251 end parameterInfos
257252
258253 /**
0 commit comments