mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 04:27:17 +00:00
5fff7d61e1
Change-Id: I43ab07aebe7918a1265f8dc594b759e85c08e862 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150264 Auto-Submit: Bob Nystrom <rnystrom@google.com> Commit-Queue: Erik Ernst <eernst@google.com> Reviewed-by: Erik Ernst <eernst@google.com>
25 lines
713 B
Dart
25 lines
713 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.
|
|
|
|
// Regression test for dart2js that used to infinite loop on
|
|
// speculatively propagating types.
|
|
|
|
class Bar {
|
|
noSuchMethod(e) => null;
|
|
}
|
|
|
|
main() {
|
|
var d = new Bar();
|
|
|
|
while (false) {
|
|
// [input] will change from indexable to unknown: the use line 20
|
|
// changes its decision because [a2] changes its type from unknown to
|
|
// null.
|
|
var input = ((x) {})(null);
|
|
var p2 = input.keys.firstWhere(null);
|
|
var a2 = input.keys.firstWhere(null);
|
|
print(input[a2] == p2);
|
|
}
|
|
}
|