You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm migrating regression tests and the tall style produces:
greet(
@Rest(valueHelp:'who', help:'Name(s) to greet.') List<String> who, {
@Group.start(title:'Output')
@Option(help:'How many !\'s to append.')
int enthusiasm:0,
@Flag(abbr:'l', help:'Put names on separate lines.') bool lineMode:false,
@Option(name:'greeting', help:'Alternate word to greet with e.g. "Hi".')
String salutation:'Hello',
}) {}
There are several things wrong here:
The subsequent @Option annotations shouldn't be indented.
The parameter shouldn't be indented.
There's no reason to split at the :.
The text was updated successfully, but these errors were encountered:
The AST node for a parameter with both metadata and a default value
looks like:
DefaultValueFormalParameter
FormalParameter
The inner node has the metadata and the outer one has the default value.
Prior to this PR, that meant that we'd create an AssignPiece for the
default value whose left-hand side piece was the function parameter and
its metadata. That meant that when the metadata split, the outer
AssignPiece would be forced to split.
This slightly awkward change makes the piece structure reflect how the
user (and, alas, not Analyzer) thinks of the syntax where the metadata
is part of the entire parameter and the default value is inside the
parameter.
Fix#1461.
…es. (#1478)
Correct indentation on parameters with both metadata and default values.
The AST node for a parameter with both metadata and a default value
looks like:
DefaultValueFormalParameter
FormalParameter
The inner node has the metadata and the outer one has the default value.
Prior to this PR, that meant that we'd create an AssignPiece for the
default value whose left-hand side piece was the function parameter and
its metadata. That meant that when the metadata split, the outer
AssignPiece would be forced to split.
This slightly awkward change makes the piece structure reflect how the
user (and, alas, not Analyzer) thinks of the syntax where the metadata
is part of the entire parameter and the default value is inside the
parameter.
Fix#1461.
Co-authored-by: Nate Bosch <nbosch@google.com>
I'm migrating regression tests and the tall style produces:
There are several things wrong here:
@Option
annotations shouldn't be indented.:
.The text was updated successfully, but these errors were encountered: