File tree 1 file changed +6
-12
lines changed
compiler/src/dotty/tools/dotc/ast
1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -122,20 +122,14 @@ object MainProxies {
122
122
mt.paramInfos.zip(mt.paramNames).zipWithIndex.map {
123
123
case ((formal, paramName), n) =>
124
124
val argName = nme.args ++ n.toString
125
-
126
125
val isRepeated = formal.isRepeatedParam
127
126
128
- var argRef : Tree = Apply (Ident (argName), Nil )
129
- var formalType = formal
130
- if isRepeated then
131
- argRef = repeated(argRef)
132
- formalType = formalType.argTypes.head
133
-
134
- val getterSym =
135
- if isRepeated then
136
- defn.MainAnnotCommand_varargGetter
137
- else
138
- defn.MainAnnotCommand_argGetter
127
+ val (argRef, formalType, getterSym) = {
128
+ val argRef0 = Apply (Ident (argName), Nil )
129
+ if formal.isRepeatedParam then
130
+ (repeated(argRef0), formal.argTypes.head, defn.MainAnnotCommand_varargGetter )
131
+ else (argRef0, formal, defn.MainAnnotCommand_argGetter )
132
+ }
139
133
140
134
// The ParameterInfos to be passed to the arg getter
141
135
val parameterInfos = {
You can’t perform that action at this time.
0 commit comments