Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(408)

Unified Diff: pkg/compiler/lib/src/diagnostics/generated/shared_messages.dart

Issue 1660703002: Share the first error messages. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove bad export. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | pkg/compiler/lib/src/diagnostics/messages.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/diagnostics/generated/shared_messages.dart
diff --git a/pkg/compiler/lib/src/diagnostics/generated/shared_messages.dart b/pkg/compiler/lib/src/diagnostics/generated/shared_messages.dart
index c8617cc8f5c758cf67e844d3d7b8b3363210f215..2aa258a9818f72ec2d68bd3ac920ca9333e505c4 100644
--- a/pkg/compiler/lib/src/diagnostics/generated/shared_messages.dart
+++ b/pkg/compiler/lib/src/diagnostics/generated/shared_messages.dart
@@ -9,29 +9,26 @@ Messages are maintained in `lib/shared_messages.dart` of that same package.
After any change to that file, run `bin/publish.dart` to generate a new version
of the json, dart2js and analyzer representations.
*/
-import '../messages.dart' show MessageTemplate;
+import '../messages.dart' show MessageKind, MessageTemplate;
-enum SharedMessageKind {
- exampleMessage
-}
-
-const Map<SharedMessageKind, MessageTemplate> TEMPLATES = const <SharedMessageKind, MessageTemplate>{
- SharedMessageKind.exampleMessage: const MessageTemplate(
- SharedMessageKind.exampleMessage,
- "#use #named #arguments",
- howToFix: "an explanation on how to fix things",
+const Map<MessageKind, MessageTemplate> TEMPLATES = const <MessageKind, MessageTemplate>{
+ MessageKind.CONST_CONSTRUCTOR_OR_FACTORY_WITH_BODY: const MessageTemplate(
+ MessageKind.CONST_CONSTRUCTOR_OR_FACTORY_WITH_BODY,
+ "Const constructor or factory can't have a body.",
+ howToFix: "Remove the 'const' keyword or the body.",
examples: const [
r'''
- Some multiline example;
- That generates the bug.''',
- const {
- 'fileA.dart': r'''
- or a map from file to content.
- again multiline''',
- 'fileB.dart': r'''
- with possibly multiple files.
- muliline too''',
- },
+ class C {
+ const C() {}
+ }
+
+ main() => new C();''',
+ r'''
+ class C {
+ const factory C() {}
+ }
+
+ main() => new C();''',
]
), // Generated. Don't edit.
};
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | pkg/compiler/lib/src/diagnostics/messages.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698