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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/CompileTimeErrorCode.java

Issue 16113003: Report SWC. and CTEC.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add comment 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
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/StaticWarningCode.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/CompileTimeErrorCode.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/CompileTimeErrorCode.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/CompileTimeErrorCode.java
index 1098027eb6740560e45562aa8b6385d93dae685b..f089c49e9372554144d03f0b4b67048f323b637a 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/CompileTimeErrorCode.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/CompileTimeErrorCode.java
@@ -131,6 +131,20 @@ public enum CompileTimeErrorCode implements ErrorCode {
"Cannot define the 'const' constructor for a class with non-final fields"),
/**
+ * 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error if o is not
+ * <b>null</b> and the interface of the class of <i>o</i> is not a subtype of the static type of
+ * the field <i>v</i>.
+ * <p>
+ * 12.11.2 Const: It is a compile-time error if evaluation of a constant object results in an
+ * uncaught exception being thrown.
+ *
+ * @param initializerType the name of the type of the initializer expression
+ * @param fieldType the name of the type of the field
+ */
+ CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE(
+ "The initializer type '%s' cannot be assigned to the field type '%s'"),
+
+ /**
* 6.2 Formal Parameters: It is a compile-time error if a formal parameter is declared as a
* constant variable.
*/
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/StaticWarningCode.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698