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
[front_end] Change TypeLabeler to return LabeledString.
The methods 'TypeLabeler.labelConstant` and `TypeLabeler.labelType`
are changed so that instead of returning a list of `Object` (which the
caller needs to `join()`), they return a new `LabeledString` class
whose `toString()` method takes care of calling `join()`.
This simplifies the code generation of CFE diagnostic
`.withArgumentsOld` methods, because it's no longer necessary to be
careful about calling `join()` after *all* inputs have been converted;
instead, the inputs can be converted in whatever order is convenient,
and the final `join()` happens implicitly when the `LabeledString`s
are converted to `String`s as part of string interpolation.
In follow-up CLs, I plan to rework the code generator for
`withArgumentsOld` so that it's easy to generate a parallel
`withArguments` function that takes named arguments. Starting from a
less complex code generator will make that rework easier.
Change-Id: I6a6a696415b214b7743f8e23192f2320aa499987
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/447821
Reviewed-by: Johnni Winther <[email protected]>
Commit-Queue: Paul Berry <[email protected]>
0 commit comments