@@ -265,15 +265,13 @@ object MainProxies {
265265 val argName = nme.args ++ idx.toString
266266 val isRepeated = formal.isRepeatedParam
267267 val formalType = if isRepeated then formal.argTypes.head else formal
268- val getterSym =
269- if isRepeated then defn.MainAnnotationCommand_varargGetter
270- else defn.MainAnnotationCommand_argGetter
268+ val getterName = if isRepeated then nme.varargGetter else nme.argGetter
271269 val defaultValueGetterOpt = defaultValueSymbols.get(idx) match
272270 case None => ref(defn.NoneModule .termRef)
273271 case Some (dvSym) =>
274272 val value = unitToValue(ref(dvSym.termRef))
275273 Apply (ref(defn.SomeClass .companionModule.termRef), value)
276- val argGetter0 = TypeApply (Select (Ident (nme.cmd), getterSym.name ), TypeTree (formalType) :: Nil )
274+ val argGetter0 = TypeApply (Select (Ident (nme.cmd), getterName ), TypeTree (formalType) :: Nil )
277275 val argGetter =
278276 if isRepeated then argGetter0
279277 else Apply (argGetter0, List (Literal (Constant (idx)), defaultValueGetterOpt))
@@ -324,11 +322,11 @@ object MainProxies {
324322 nme.cmd,
325323 TypeTree (),
326324 Apply (
327- Select (instantiateAnnotation(mainAnnot), defn. MainAnnotation_command .name ),
325+ Select (instantiateAnnotation(mainAnnot), nme.command ),
328326 List (cmdInfo, Ident (nme.args))
329327 )
330328 )
331- val run = Apply (Select (Ident (nme.cmd), defn. MainAnnotationCommand_run .name ), mainCall)
329+ val run = Apply (Select (Ident (nme.cmd), nme.run ), mainCall)
332330 val body = Block (cmdInfo :: cmd :: args, run)
333331 val mainArg = ValDef (nme.args, TypeTree (defn.ArrayType .appliedTo(defn.StringType )), EmptyTree )
334332 .withFlags(Param )
0 commit comments