| Index: tests/language/initializing_formal_scope_test.dart
|
| diff --git a/tests/language/initializing_formal_capture_test.dart b/tests/language/initializing_formal_scope_test.dart
|
| similarity index 77%
|
| copy from tests/language/initializing_formal_capture_test.dart
|
| copy to tests/language/initializing_formal_scope_test.dart
|
| index 7ad3f083cc185754bd31b937bbfba57421445846..3c985c77553f7f88155fe3c0a97e3afe765347ef 100644
|
| --- a/tests/language/initializing_formal_capture_test.dart
|
| +++ b/tests/language/initializing_formal_scope_test.dart
|
| @@ -7,13 +7,14 @@
|
| import "package:expect/expect.dart";
|
|
|
| class A {
|
| - var x, y;
|
| - A(this.x) : y = (() => x);
|
| + var x;
|
| + A(this.x) {
|
| + // In the body the field is in scope, not the initializing formal.
|
| + x += 1;
|
| + }
|
| }
|
|
|
| main() {
|
| A a = new A(2);
|
| - a.x = 3;
|
| Expect.equals(a.x, 3);
|
| - Expect.equals(a.y(), 2);
|
| }
|
|
|