dart-sdk/tests/language/assert/assignable_type_test.dart
Riley Porter ed086f0f95 [tests] Remove more deprecated List constructor usage in tests
Change-Id: I9a6da832ee51f9362bb2ea4f17931a109b36456e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142721
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Riley Porter <rileyporter@google.com>
2020-04-07 20:09:26 +00:00

29 lines
913 B
Dart

// Copyright (c) 2013, 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.
// Dart test program to test arithmetic operations.
// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
// This test crashes if we recompute type of AssertAssignableInstr based on its
// output types. By doing that we would eliminate not only the unnecessary
// AssertAssignableInstr but also the trailing class check.
main() {
// Foul up IC data in integer's unary minus.
var y = -0x80000000;
testInt64List();
}
testInt64List() {
var array = new List<int?>.filled(10, null);
testInt64ListImpl(array);
}
testInt64ListImpl(array) {
for (int i = 0; i < 10; ++i) {}
int sum = 0;
for (int i = 0; i < 10; ++i) {
array[i] = -0x80000000000000 + i;
}
}