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

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

Issue 18110007: Report CTEC.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS for 'const' instance creation. (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
« 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 1a5dcd7dc60b8f884c80ad15738e9655e04d4323..c738a8b1976c70c081442bc50e034f07d43c13b7 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
@@ -1079,6 +1079,26 @@ public enum CompileTimeErrorCode implements ErrorCode {
SUPER_INITIALIZER_IN_OBJECT(""),
/**
+ * 12.11 Instance Creation: It is a static type warning if any of the type arguments to a
+ * constructor of a generic type <i>G</i> invoked by a new expression or a constant object
+ * expression are not subtypes of the bounds of the corresponding formal type parameters of
+ * <i>G</i>.
+ * <p>
+ * 12.11.1 New: If T is malformed a dynamic error occurs. In checked mode, if T is mal-bounded a
+ * dynamic error occurs.
+ * <p>
+ * 12.1 Constants: It is a compile-time error if evaluation of a compile-time constant would raise
+ * an exception.
+ * <p>
+ *
+ * @see StaticTypeWarningCode#TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
+ * @param boundedTypeName the name of the type used in the instance creation that should be
+ * limited by the bound as specified in the class declaration
+ * @param boundingTypeName the name of the bounding type
+ */
+ TYPE_ARGUMENT_NOT_MATCHING_BOUNDS("'%s' does not extend '%s'"),
+
+ /**
* 12.11.2 Const: It is a compile-time error if <i>T</i> is not a class accessible in the current
* scope, optionally followed by type arguments.
*/
« 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