| Index: tests/language/gvn_interceptor_test.dart
|
| diff --git a/tests/language/bind_test.dart b/tests/language/gvn_interceptor_test.dart
|
| similarity index 54%
|
| copy from tests/language/bind_test.dart
|
| copy to tests/language/gvn_interceptor_test.dart
|
| index e73f68e5514cb26527208fa3b2d1df8f3a145fe4..9e75f20f25acce73f379c1cb65aa2b0dd1de9ba4 100644
|
| --- a/tests/language/bind_test.dart
|
| +++ b/tests/language/gvn_interceptor_test.dart
|
| @@ -2,13 +2,14 @@
|
| // 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 Bound {
|
| - run() {
|
| - return 42;
|
| +foo(a, index) {
|
| + if (a.length < index) {
|
| + for (int i = a.length; i <= index; i++) a.add(i);
|
| }
|
| + // dart2js was reusing the a.length from above.
|
| + return a[a.length - 1];
|
| }
|
|
|
| void main() {
|
| - var runner = new Bound().run;
|
| - Expect.equals(42, runner());
|
| + Expect.equals(3, foo([0], 3));
|
| }
|
|
|