57f18c6d38
These tests show that we handle >> and >>> similarly wrt to allowing integer operations on double constants with integer values. https://github.com/dart-lang/sdk/issues/45438 proposes to disallow these, but that requires a new js evaluation strategy and the issue in 45376 is therefore just a consequence of the current approach. Change-Id: I703b57d5a6562ff1c1410858b22a96655f59dc4c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193406 Reviewed-by: Dmitry Stefantsov <dmitryas@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com>
15 lines
385 B
Dart
15 lines
385 B
Dart
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
class MyClass {
|
|
final int a;
|
|
final int b;
|
|
const MyClass(i1, i2) : a = (i1 >>> i2), b = (i1 >>> i2);
|
|
}
|
|
|
|
test() {
|
|
const MyClass c1 = MyClass(1.0, 1);
|
|
}
|
|
|
|
main() {} |