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

Unified Diff: pkg/front_end/messages.yaml

Issue 3007033002: report const class as a more specific error code (Closed)
Patch Set: Created 3 years, 3 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/front_end/lib/src/fasta/parser/parser.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/messages.yaml
diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml
index 23e3fd5a40c3b5d73ab442107627543ccac0a156..94cb4153fc619e154cc31e99ea5bdc520c9ce948 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -174,6 +174,13 @@ ExpectedType:
template: "Expected a type, but got '#lexeme'."
dart2jsCode: "*fatal*"
+ConstClass:
+ template: "Classes can't be declared to be 'const'."
+ tip: "Try removing the 'const' keyword. If you're trying to indicate that instances of the class can be constants, place the 'const' keyword on the class' constructor(s)."
+ analyzerCode: CONST_CLASS
+ dart2jsCode: EXTRANEOUS_MODIFIER
+ script: "const class C {}"
+
ExtraneousModifier:
template: "Can't have modifier '#lexeme' here."
tip: "Try removing '#lexeme'."
« no previous file with comments | « pkg/front_end/lib/src/fasta/parser/parser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698