Index: tests/language/state_mangling4_test.dart |
diff --git a/tests/language/state_mangling_test.dart b/tests/language/state_mangling4_test.dart |
similarity index 66% |
copy from tests/language/state_mangling_test.dart |
copy to tests/language/state_mangling4_test.dart |
index 02df690ca51e966dc7f9395ebc47a5417bbbe578..b6aab91f1bd54fd3730c4aea2c5469ed443e07a0 100644 |
--- a/tests/language/state_mangling_test.dart |
+++ b/tests/language/state_mangling4_test.dart |
@@ -2,17 +2,17 @@ |
// 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. |
-foo(state) { |
- if (state == null) return 0; |
- var sum = 0; |
- for (int i = 0; i < state.length; i++) { |
- sum += state[i]; |
+foo(env1) { |
+ if (env1 == null) return 0; |
+ var env0 = 0; |
+ for (int i = 0; i < env1.length; i++) { |
+ env0 += env1[i]; |
} |
- state = inscrutableId(state); |
- for (int i = 0; i < state.length; i++) { |
- sum += state[i]; |
+ env1 = inscrutableId(new A()); |
+ for (int i = 0; i < env1.length; i++) { |
+ env0 += env1[i]; |
} |
- return sum; |
+ return env0; |
} |
int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1)); |
@@ -28,7 +28,7 @@ class A { |
} |
main() { |
- Expect.equals(12, foo([1, 2, 3])); |
+ Expect.equals(9, foo([1, 2, 3])); |
if (inscrutableId(0) == 0) { |
Expect.equals(6, foo(new A())); |
} |