| Index: pkg/analyzer/test/src/summary/resynthesize_test.dart
|
| diff --git a/pkg/analyzer/test/src/summary/resynthesize_test.dart b/pkg/analyzer/test/src/summary/resynthesize_test.dart
|
| index d847dc51c1711178a0db0ea9390289f8a5e98477..5f4f980030406e0269331a57f93706f45d8427fc 100644
|
| --- a/pkg/analyzer/test/src/summary/resynthesize_test.dart
|
| +++ b/pkg/analyzer/test/src/summary/resynthesize_test.dart
|
| @@ -92,8 +92,8 @@ class ResynthTest extends ResolverTestCase {
|
| reason: '$desc fields.length');
|
| for (int i = 0; i < resynthesized.fields.length; i++) {
|
| String name = original.fields[i].name;
|
| - compareFieldElements(resynthesized.getField(name), original.fields[i],
|
| - '$desc.field $name');
|
| + compareFieldElements(
|
| + resynthesized.fields[i], original.fields[i], '$desc.field $name');
|
| }
|
| compareTypes(
|
| resynthesized.supertype, original.supertype, '$desc supertype');
|
| @@ -124,18 +124,10 @@ class ResynthTest extends ResolverTestCase {
|
| }
|
| expect(resynthesized.accessors.length, original.accessors.length);
|
| for (int i = 0; i < resynthesized.accessors.length; i++) {
|
| - String name = original.accessors[i].name;
|
| - if (name.endsWith('=')) {
|
| - comparePropertyAccessorElements(
|
| - resynthesized.getSetter(name),
|
| - original.accessors[i],
|
| - '$desc setter ${original.accessors[i].name}');
|
| - } else {
|
| - comparePropertyAccessorElements(
|
| - resynthesized.getGetter(name),
|
| - original.accessors[i],
|
| - '$desc getter ${original.accessors[i].name}');
|
| - }
|
| + comparePropertyAccessorElements(
|
| + resynthesized.accessors[i],
|
| + original.accessors[i],
|
| + '$desc accessor ${original.accessors[i].name}');
|
| }
|
| expect(resynthesized.methods.length, original.methods.length);
|
| for (int i = 0; i < resynthesized.methods.length; i++) {
|
| @@ -724,6 +716,16 @@ class E {
|
| checkLibrary('class C { dynamic x; C(this.x); }');
|
| }
|
|
|
| + test_class_constructor_field_formal_multiple_matching_fields() {
|
| + // This is a compile-time error but it should still analyze consistently.
|
| + checkLibrary('class C { C(this.x); int x; String x; }', allowErrors: true);
|
| + }
|
| +
|
| + test_class_constructor_field_formal_no_matching_field() {
|
| + // This is a compile-time error but it should still analyze consistently.
|
| + checkLibrary('class C { C(this.x); }', allowErrors: true);
|
| + }
|
| +
|
| test_class_constructor_field_formal_typed_dynamic() {
|
| checkLibrary('class C { num x; C(dynamic this.x); }');
|
| }
|
|
|