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

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

Issue 15316011: Report MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS and other redirection related. (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
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/verifier/ErrorVerifier.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 810fb50fd7cec70a0a8304976171d685c370d31e..cbb3ef955352a17c04f6d1f6118cdff9102267fd 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
@@ -382,11 +382,14 @@ public enum CompileTimeErrorCode implements ErrorCode {
"Initializing formal fields can only be used in constructors"),
/**
+ * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its
+ * only action is to invoke another generative constructor.
+ * <p>
* 7.6.1 Generative Constructors: It is a compile-time error if an initializing formal is used by
* a function other than a non-redirecting generative constructor.
*/
FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR(
- "Initializing formal fields cannot be used in redirecting constructors"),
+ "The redirecting constructor cannot have a field initializer"),
/**
* 5 Variables: It is a compile-time error if a library, static or local variable <i>v</i> is
@@ -693,6 +696,13 @@ public enum CompileTimeErrorCode implements ErrorCode {
MIXIN_WITH_NON_CLASS_SUPERCLASS("Mixin can only be applied to class"),
/**
+ * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its
+ * only action is to invoke another generative constructor.
+ */
+ MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS(
+ "Constructor may have at most one 'this' redirection"),
+
+ /**
* 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Then <i>k</i> may
* include at most one superinitializer in its initializer list or a compile time error occurs.
*/
@@ -888,6 +898,12 @@ public enum CompileTimeErrorCode implements ErrorCode {
SUPER_IN_INVALID_CONTEXT("Invalid context for 'super' invocation"),
/**
+ * 7.6.1 Generative Constructors: A generative constructor may be redirecting, in which case its
+ * only action is to invoke another generative constructor.
+ */
+ SUPER_IN_REDIRECTING_CONSTRUCTOR("The redirecting constructor cannot have a 'super' initializer"),
+
+ /**
* 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile-time
* error if a generative constructor of class Object includes a superinitializer.
*/
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/verifier/ErrorVerifier.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698