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
The formatter for Dart 2 will need to understand and format programs that omit some new and const prefixes.
The exact details depends on which format the common front-end provides for such a program, but it must be possible to format without introducing the missing new and const tokens in the output.
The text was updated successfully, but these errors were encountered:
In almost all cases, an elided "new"/"const" is parsed as a normal
method call by analyzer, so the existing formatting behavior for those
does the right thing. The only edge case is a named constructor on a
generic class. That syntax can *only* be a constructor call, so it's
parsed as an instance creation expression.
When we get to that code path, we need to not add an extra space before
the class name if there is no preceding "new" or "const" keyword.
Fix#652.
In almost all cases, an elided "new"/"const" is parsed as a normal
method call by analyzer, so the existing formatting behavior for those
does the right thing. The only edge case is a named constructor on a
generic class. That syntax can *only* be a constructor call, so it's
parsed as an instance creation expression.
When we get to that code path, we need to not add an extra space before
the class name if there is no preceding "new" or "const" keyword.
Fix#652.
This is the formatter specific issue tracking dart-lang/sdk#30921.
The formatter for Dart 2 will need to understand and format programs that omit some
new
andconst
prefixes.The exact details depends on which format the common front-end provides for such a program, but it must be possible to format without introducing the missing
new
andconst
tokens in the output.The text was updated successfully, but these errors were encountered: