| Index: tests/language/gvn_field_access_test.dart
|
| diff --git a/tests/language/bind_test.dart b/tests/language/gvn_field_access_test.dart
|
| similarity index 51%
|
| copy from tests/language/bind_test.dart
|
| copy to tests/language/gvn_field_access_test.dart
|
| index e73f68e5514cb26527208fa3b2d1df8f3a145fe4..79359f2279d511550925dac859c60fb953fce079 100644
|
| --- a/tests/language/bind_test.dart
|
| +++ b/tests/language/gvn_field_access_test.dart
|
| @@ -2,13 +2,18 @@
|
| // 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;
|
| +class A {
|
| + var y = 0;
|
| + foo(x) {
|
| + var t = this.y;
|
| + if (t < x) {
|
| + for (int i = this.y; i < x; i++) y++;
|
| + }
|
| + // dart2js was reusing the 't' from above.
|
| + return this.y;
|
| }
|
| }
|
|
|
| void main() {
|
| - var runner = new Bound().run;
|
| - Expect.equals(42, runner());
|
| + Expect.equals(3, new A().foo(3));
|
| }
|
|
|