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

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

Issue 15074002: Report StaticTypeWarningCode.AMBIGUOUS_IMPORT when used as type annotation. (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/StaticTypeWarningCode.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/StaticTypeWarningCode.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/StaticTypeWarningCode.java
index 379d82aa1103a73f74ff641a1834da783a31938a..0e0a0156f024c249d217cf8c4e6d0ef9c4680ac6 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/StaticTypeWarningCode.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/StaticTypeWarningCode.java
@@ -23,6 +23,22 @@ package com.google.dart.engine.error;
*/
public enum StaticTypeWarningCode implements ErrorCode {
/**
+ * 14.1 Imports: If a name <i>N</i> is referenced by a library <i>L</i> and <i>N</i> is introduced
+ * into the top level scope <i>L</i> by more than one import then:
+ * <ol>
+ * <li>It is a static warning if <i>N</i> is used as a type annotation.
jwren 2013/05/09 01:39:29 If this is correct, then this is a static warning,
scheglov 2013/05/09 01:48:07 You are right. I've missed that fact. Will create
+ * <li>In checked mode, it is a dynamic error if <i>N</i> is used as a type annotation and
+ * referenced during a subtype test.
+ * <li>Otherwise, it is a compile-time error.
+ * </ol>
+ *
+ * @param ambiguousTypeName the name of the ambiguous type
+ * @param firstLibraryName the name of the first library that the type is found
+ * @param secondLibraryName the name of the second library that the type is found
+ */
+ AMBIGUOUS_IMPORT("The type '%s' is defined in the libraries '%s' and '%s'"),
+
+ /**
* 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>. It is a static type
* warning if <i>T</i> does not have an accessible instance setter named <i>v=</i>.
*

Powered by Google App Engine
This is Rietveld 408576698