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

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

Issue 23496048: Add additional hints to the analyzer to catch the 'x is double' dart2js bug. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase to latest & merge Created 7 years, 3 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/HintCode.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/HintCode.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/HintCode.java
index 736ceae5fb5b03f29ade79ed669738bab54e5b10..372059a4d0e26354233bf42f4a53366aae6e7bc7 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/HintCode.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/HintCode.java
@@ -42,6 +42,27 @@ public enum HintCode implements ErrorCode {
"Dead code, this on-catch block will never be executed since '%s' is a subtype of '%s'"),
/**
+ * Hint for the {@code x is double} type checks.
+ */
+ IS_DOUBLE("When compiled to JS, this test will return true when the left hand side is an int"),
+
+ /**
+ * Hint for the {@code x is int} type checks.
+ */
+ IS_INT("When compiled to JS, this test will return true when the left hand side is a double"),
karlklose 2013/09/12 10:53:56 It '*may* return true' (if the double is of the fo
jwren 2013/09/12 20:45:07 Agreed. Sending a doc to you and the rest of the
+
+ /**
+ * Hint for the {@code x is! double} type checks.
+ */
+ IS_NOT_DOUBLE(
+ "When compiled to JS, this test will return false when the left hand side is an int"),
+
+ /**
+ * Hint for the {@code x is! int} type checks.
karlklose 2013/09/12 10:53:56 Ditto.
+ */
+ IS_NOT_INT("When compiled to JS, this test will return false when the left hand side is a double"),
karlklose 2013/09/12 10:53:56 Long line? (I am not sure which limit you use)
+
+ /**
* Unused imports are imports which are never not used.
*/
UNUSED_IMPORT("Unused import");

Powered by Google App Engine
This is Rietveld 408576698