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

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

Issue 18555007: Bug fix in analysis engine, implementation of new error code to prevent type parameters in static m… (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/StaticWarningCode.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/StaticWarningCode.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/StaticWarningCode.java
index 3072354009d0f230790a090d7bbd43bdf7ee0db6..1b8a4f20c432d11f583bcab18d49beb26a76d3c3 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/StaticWarningCode.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/StaticWarningCode.java
@@ -613,6 +613,15 @@ public enum StaticWarningCode implements ErrorCode {
TYPE_TEST_NON_TYPE("The name '%s' is not a type and cannot be used in an 'is' expression"),
/**
+ * 10 Generics: However, a type parameter is considered to be a malformed type when referenced by
+ * a static member.
+ * <p>
+ * 15.1 Static Types: Any use of a malformed type gives rise to a static warning. A malformed type
+ * is then interpreted as dynamic by the static type checker and the runtime.
+ */
+ TYPE_PARAMETER_REFERENCED_BY_STATIC("Static members cannot reference type parameters"),
+
+ /**
* 15.1 Static Types: A type <i>T</i> is malformed iff: <li><i>T</i> has the form <i>id</i> or the
* form <i>prefix.id</i>, and in the enclosing lexical scope, the name <i>id</i> (respectively
* <i>prefix.id</i>) does not denote a type.</li> <li><i>T</i> denotes a type variable in the

Powered by Google App Engine
This is Rietveld 408576698