| Index: tests/language/list_length_tracer_test.dart
|
| ===================================================================
|
| --- tests/language/list_length_tracer_test.dart (revision 27940)
|
| +++ tests/language/list_length_tracer_test.dart (working copy)
|
| @@ -2,8 +2,8 @@
|
| // 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.
|
|
|
| -// Test that a loop invariant code motion optimization does not try to
|
| -// hoist instructions that may throw.
|
| +// Test that dart2js' optimization on list length does not fold a
|
| +// length getter to a constant if the receiver can be null.
|
|
|
| import "package:expect/expect.dart";
|
|
|
| @@ -11,12 +11,6 @@
|
| var b;
|
|
|
| main() {
|
| - Expect.throws(() {
|
| - while (true) {
|
| - a = 54;
|
| - b.length;
|
| - }
|
| - });
|
| - b = [];
|
| - Expect.equals(54, a);
|
| + Expect.throws(() => b.length);
|
| + b = const [42];
|
| }
|
|
|