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

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

Issue 14856021: Report UNDEFINED_CONSTRUCTOR_IN_INITIALIZER and others (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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/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 0dc6cc80701ba6123a57bc39727487b9e2d5381a..047d4e409dccf8c4df497394a074338b731342a0 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
@@ -752,6 +752,14 @@ public enum CompileTimeErrorCode implements ErrorCode {
"Initializer expressions in constant constructors must be constants"),
/**
+ * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the superinitializer appears
+ * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generative constructor. It is
+ * a compile-time error if class <i>S</i> does not declare a generative constructor named <i>S</i>
+ * (respectively <i>S.id</i>)
+ */
+ NON_GENERATIVE_CONSTRUCTOR("The constructor '%s' is not generative"),
+
+ /**
* 7.9 Superclasses: It is a compile-time error to specify an extends clause for class Object.
*/
// Low priority- Object is provided by the SDK
@@ -890,7 +898,16 @@ public enum CompileTimeErrorCode implements ErrorCode {
* a compile-time error if class <i>S</i> does not declare a generative constructor named <i>S</i>
* (respectively <i>S.id</i>)
*/
- UNDEFINED_CONSTRUCTOR_IN_INITIALIZER(""),
+ UNDEFINED_CONSTRUCTOR_IN_INITIALIZER("The class '%s' does not have a generative constructor '%s'"),
+
+ /**
+ * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the superinitializer appears
+ * and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generative constructor. It is
+ * a compile-time error if class <i>S</i> does not declare a generative constructor named <i>S</i>
+ * (respectively <i>S.id</i>)
+ */
+ UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT(
+ "The class '%s' does not have a default generative constructor"),
/**
* 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. Each final instance

Powered by Google App Engine
This is Rietveld 408576698