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

Unified Diff: compiler/java/com/google/dart/compiler/DartCompilerErrorCode.java

Issue 8231031: Check for compile-time constants in DartCompiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Renamed CompileTimeConstTest to CTConst2Test Created 9 years, 2 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: compiler/java/com/google/dart/compiler/DartCompilerErrorCode.java
diff --git a/compiler/java/com/google/dart/compiler/DartCompilerErrorCode.java b/compiler/java/com/google/dart/compiler/DartCompilerErrorCode.java
index 97f2d337f934cb709895a7be54622d8d104eb395..e4d8208668d31c87649054a27a69924311c53f44 100644
--- a/compiler/java/com/google/dart/compiler/DartCompilerErrorCode.java
+++ b/compiler/java/com/google/dart/compiler/DartCompilerErrorCode.java
@@ -39,7 +39,7 @@ public enum DartCompilerErrorCode implements ErrorCode {
CONSTRUCTOR_CANNOT_BE_ABSTRACT("A constructor cannot be asbstract"),
CONSTRUCTOR_CANNOT_BE_STATIC("A constructor cannot be static"),
CONSTRUCTOR_MUST_CALL_SUPER("Constructors must call super constructor"),
- CONST_CONSTRUCTOR_CANNOT_HAVE_BODY("A cconst onstructor cannot have a body"),
+ CONST_CONSTRUCTOR_CANNOT_HAVE_BODY("A const constructor cannot have a body"),
CONST_CONSTRUCTOR_MUST_CALL_CONST_SUPER("const constructor must call const super constructor"),
CONSTANTS_MUST_BE_INITIALIZED("constants must be initialized"),
CYCLIC_CLASS("%s causes a cycle in the supertype graph"),
@@ -60,6 +60,12 @@ public enum DartCompilerErrorCode implements ErrorCode {
EXPECTED_COMMA_OR_RIGHT_BRACE("Expected ',' or '}'"),
EXPECTED_COMMA_OR_RIGHT_PAREN("Expected ',' or ')', but got '%s'"),
EXPECTED_COMPOUND_STATEMENT("SyntaxError: expected if, switch, while, do, or for"),
+ EXPECTED_CONSTANT_EXPRESSION("Expected constant expression"),
+ EXPECTED_CONSTANT_EXPRESSION_BOOLEAN("Expected constant expression of type boolean, got %s"),
floitsch 2011/10/14 14:36:58 why not "bool"? or why not "integer" below?
zundel 2011/10/14 20:59:52 made it consistent with 'bool', 'int', and 'num'
+ EXPECTED_CONSTANT_EXPRESSION_INT("Expected constant expression of type int, got %s"),
+ EXPECTED_CONSTANT_EXPRESSION_NUMBER("Expected constant expression of type number, got %s"),
+ EXPECTED_CONSTANT_EXPRESSION_STRING_NUMBER_BOOL(
+ "Expected constant expression of type string, number or boolean, got %s"),
EXPECTED_CONSTANT_LITERAL("Expected a constant literal"),
EXPECTED_EOS("Unexpected token '%s' (expected end of file)"),
EXPECTED_FIELD_NOT_CLASS("%s is a class, expected a local field"),

Powered by Google App Engine
This is Rietveld 408576698