Skip to content

Commit 6052f3e

Browse files
stereotype441Commit Queue
authored andcommitted
[front end] Remove message... declarations.
This is the final CL in a series of CLs that standardizes CFE error reporting to always use `codeFoo.withArguments(...)` when reporting errors that take arguments and `codeFoo` when reporting errors that don't take arguments, rather than `templateFoo.withArguments(...)` when reporting errors that take arguments and `messageFoo` when reporting errors that don't take arguments. This change has two advantages: - It lends greater consistency to the CFE codebase, by allowing the same `code...` objects to be used both to name error codes (e.g., in test expectations) and to report errors. This allows everything associated with a certain error code to be found using a single invocation of "Find References" in the editor, rather than having to search separately for uses of the code and the message or template. - It should hopefully make the experience of writing code that reports errors more pleasant, since it will no longer be necessary to look up an error to see whether it takes arguments before using it; instead, the developer will be able to type the name of the message `code...` declaration, and then use autocompletion to see whether `.withArguments(...)` is required. In this CL, the `message...` declarations that define errors are removed, since they are no longer used (the equivalent `code...` declarations are used instead). Change-Id: I404e240d8d376556f147a7d80c6953bca5222f61 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/443180 Reviewed-by: Johnni Winther <[email protected]> Commit-Queue: Paul Berry <[email protected]>
1 parent 990d991 commit 6052f3e

File tree

2 files changed

+468
-2385
lines changed

2 files changed

+468
-2385
lines changed

0 commit comments

Comments
 (0)