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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/parser/ParserErrorCode.java

Issue 15269005: Report ParserErrorCode.CONST_CONSTRUCTOR_WITH_BODY and other body-related errors (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes for review comments. Created 7 years, 7 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
Index: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/parser/ParserErrorCode.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/parser/ParserErrorCode.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/parser/ParserErrorCode.java
index 3da1a91f89d239bfc313ad39182e93f15f9853a4..a2cd779c72b33400541768d0a051d9c633d02424 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/parser/ParserErrorCode.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/parser/ParserErrorCode.java
@@ -35,6 +35,7 @@ public enum ParserErrorCode implements ErrorCode {
CONST_AND_FINAL("Members cannot be declared to be both 'const' and 'final'"),
CONST_AND_VAR("Members cannot be declared to be both 'const' and 'var'"),
CONST_CLASS("Classes cannot be declared to be 'const'"),
+ CONST_CONSTRUCTOR_WITH_BODY("'const' constructors cannot have a body"),
CONST_FACTORY("Only redirecting factory constructors can be declared to be 'const'"),
CONST_METHOD("Getters, setters and methods cannot be declared to be 'const'"),
CONST_TYPEDEF("Type aliases cannot be declared to be 'const'"),
@@ -68,6 +69,7 @@ public enum ParserErrorCode implements ErrorCode {
EXTERNAL_SETTER_WITH_BODY("External setters cannot have a body"),
EXTERNAL_TYPEDEF("Type aliases cannot be declared to be 'external'"),
FACTORY_TOP_LEVEL_DECLARATION("Top-level declarations cannot be declared to be 'factory'"),
+ FACTORY_WITHOUT_BODY("A non-redirecting 'factory' constructor must have a body"),
FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR("Field initializers can only be used in a constructor"),
FINAL_AND_VAR("Members cannot be declared to be both 'final' and 'var'"),
FINAL_CLASS("Classes cannot be declared to be 'final'"),
@@ -138,7 +140,9 @@ public enum ParserErrorCode implements ErrorCode {
STATIC_AFTER_FINAL("The modifier 'static' should be before the modifier 'final'"),
STATIC_AFTER_VAR("The modifier 'static' should be before the modifier 'var'"),
STATIC_CONSTRUCTOR("Constructors cannot be static"),
+ STATIC_GETTER_WITHOUT_BODY("A 'static' getter must have a body"),
STATIC_OPERATOR("Operators cannot be static"),
+ STATIC_SETTER_WITHOUT_BODY("A 'static' setter must have a body"),
STATIC_TOP_LEVEL_DECLARATION("Top-level declarations cannot be declared to be 'static'"),
SWITCH_HAS_CASE_AFTER_DEFAULT_CASE(
"The 'default' case should be the last case in a switch statement"),

Powered by Google App Engine
This is Rietveld 408576698