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

Unified Diff: sdk/lib/_internal/compiler/implementation/lib/js_number.dart

Issue 16008002: Revert "Make int a double in argument type checks." (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: sdk/lib/_internal/compiler/implementation/lib/js_number.dart
diff --git a/sdk/lib/_internal/compiler/implementation/lib/js_number.dart b/sdk/lib/_internal/compiler/implementation/lib/js_number.dart
index 445e927cbc5165db1d81c3c280129aee7f5a54e5..b6219e718ca6044f7f92462d8b3f98c5bc5e62be 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/js_number.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/js_number.dart
@@ -264,14 +264,7 @@ class JSNumber extends Interceptor implements num {
}
}
-/**
- * The interceptor class for [int]s.
- *
- * This class implements double since in JavaScript all numbers are doubles, so
- * while we want to treat `2.0` as an integer for some operations, its
- * interceptor should answer `true` to `is double`.
- */
-class JSInt extends JSNumber implements int, double {
+class JSInt extends JSNumber implements int {
const JSInt();
bool get isEven => (this & 1) == 0;

Powered by Google App Engine
This is Rietveld 408576698