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

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

Issue 17587004: Report CompileTimeErrorCode.INSTANCE_STATIC_MEMBER (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 f92b8c78155b6f35f1876cbadd246a8b4b1cb864..f120f07743f4be112a77cc7a6e406bdc8f1e74a7 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
@@ -359,25 +359,6 @@ public enum CompileTimeErrorCode implements ErrorCode {
EXTRA_POSITIONAL_ARGUMENTS("%d positional arguments expected, but %d found"),
/**
- * 12.2 Null: It is a compile-time error for a class to attempt to extend or implement Null.
- * <p>
- * 12.3 Numbers: It is a compile-time error for a class to attempt to extend or implement int.
- * <p>
- * 12.3 Numbers: It is a compile-time error for a class to attempt to extend or implement double.
- * <p>
- * 12.3 Numbers: It is a compile-time error for any type other than the types int and double to
- * attempt to extend or implement num.
- * <p>
- * 12.4 Booleans: It is a compile-time error for a class to attempt to extend or implement bool.
- * <p>
- * 12.5 Strings: It is a compile-time error for a class to attempt to extend or implement String.
- *
- * @param typeName the name of the type that cannot be implemented
- * @see #EXTENDS_DISALLOWED_CLASS
- */
- IMPLEMENTS_DISALLOWED_CLASS("Classes cannot implement '%s'"),
-
- /**
* 7.6.1 Generative Constructors: Let <i>k</i> be a generative constructor. It is a compile time
* error if more than one initializer corresponding to a given instance variable appears in
* <i>k</i>'s list.
@@ -455,6 +436,25 @@ public enum CompileTimeErrorCode implements ErrorCode {
"'%s' cannot be used to name a getter, there is already a method with the same name"),
/**
+ * 12.2 Null: It is a compile-time error for a class to attempt to extend or implement Null.
+ * <p>
+ * 12.3 Numbers: It is a compile-time error for a class to attempt to extend or implement int.
+ * <p>
+ * 12.3 Numbers: It is a compile-time error for a class to attempt to extend or implement double.
+ * <p>
+ * 12.3 Numbers: It is a compile-time error for any type other than the types int and double to
+ * attempt to extend or implement num.
+ * <p>
+ * 12.4 Booleans: It is a compile-time error for a class to attempt to extend or implement bool.
+ * <p>
+ * 12.5 Strings: It is a compile-time error for a class to attempt to extend or implement String.
+ *
+ * @param typeName the name of the type that cannot be implemented
+ * @see #EXTENDS_DISALLOWED_CLASS
+ */
+ IMPLEMENTS_DISALLOWED_CLASS("Classes cannot implement '%s'"),
+
+ /**
* 7.10 Superinterfaces: It is a compile-time error if the implements clause of a class includes
* type dynamic.
*/
@@ -562,6 +562,16 @@ public enum CompileTimeErrorCode implements ErrorCode {
"'%s' is a static variable in the enclosing class, variables initialized in a constructor cannot be static"),
/**
+ * 7. Classes: It is a compile-time error if a class has an instance member and a static member
+ * with the same name.
+ *
+ * @param className the name of the class that has conflicting instance/static members
+ * @param name the name of the conflicting members
+ */
+ INSTANCE_STATIC_MEMBER(
+ "'%s' cannot have both instance and static members with the same name '%s'"),
+
+ /**
* TODO(brianwilkerson) Remove this when we have decided on how to report errors in compile-time
* constants. Until then, this acts as a placeholder for more informative errors.
*/

Powered by Google App Engine
This is Rietveld 408576698