| 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 b6219e718ca6044f7f92462d8b3f98c5bc5e62be..445e927cbc5165db1d81c3c280129aee7f5a54e5 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/lib/js_number.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/lib/js_number.dart
|
| @@ -264,7 +264,14 @@ class JSNumber extends Interceptor implements num {
|
| }
|
| }
|
|
|
| -class JSInt extends JSNumber implements int {
|
| +/**
|
| + * 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 {
|
| const JSInt();
|
|
|
| bool get isEven => (this & 1) == 0;
|
|
|