| Index: pkg/analyzer/test/src/summary/resynthesize_common.dart
|
| diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart
|
| index 38b9b1a5b3022b8e1c76632d090cae826a6fa7e0..5b633ec12026e3baf19e6ba92c582ac917a8e8b4 100644
|
| --- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
|
| +++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
|
| @@ -1833,11 +1833,22 @@ class C {
|
| var library =
|
| await checkLibrary('class C { C(this.x); }', allowErrors: true);
|
| if (isStrongMode) {
|
| - checkElementText(library, r'''
|
| + if (isSharedFrontEnd) {
|
| + // Kernel does not store 'isFieldFormal' flag explicitly.
|
| + // We infer it from presence of the corresponding FieldInitializer.
|
| + // But if there is no field, there is no FieldInitializer.
|
| + checkElementText(library, r'''
|
| +class C {
|
| + C(dynamic x);
|
| +}
|
| +''');
|
| + } else {
|
| + checkElementText(library, r'''
|
| class C {
|
| C(dynamic this.x);
|
| }
|
| ''');
|
| + }
|
| } else {
|
| checkElementText(library, r'''
|
| class C {
|
| @@ -9803,7 +9814,7 @@ const dynamic a = null;
|
| class C {
|
| dynamic x;
|
| C([@
|
| - a/*location: test.dart;a?*/ dynamic this.x = null]);
|
| + a/*location: test.dart;a?*/ dynamic this.x]);
|
| }
|
| const dynamic a = null;
|
| ''');
|
| @@ -9812,7 +9823,7 @@ const dynamic a = null;
|
| class C {
|
| dynamic x;
|
| C([@
|
| - a/*location: test.dart;a?*/ dynamic this.x = null]);
|
| + a/*location: test.dart;a?*/ dynamic this.x]);
|
| }
|
| const dynamic a = null;
|
| ''');
|
| @@ -9913,13 +9924,13 @@ dynamic f(@
|
| checkElementText(library, r'''
|
| const dynamic a = null;
|
| dynamic f([@
|
| - a/*location: test.dart;a?*/ () → dynamic g = null]) {}
|
| + a/*location: test.dart;a?*/ () → dynamic g]) {}
|
| ''');
|
| } else {
|
| checkElementText(library, r'''
|
| const dynamic a = null;
|
| dynamic f([@
|
| - a/*location: test.dart;a?*/ () → dynamic g = null]) {}
|
| + a/*location: test.dart;a?*/ () → dynamic g]) {}
|
| ''');
|
| }
|
| }
|
| @@ -10155,13 +10166,13 @@ dynamic f(@
|
| checkElementText(library, r'''
|
| const dynamic a = null;
|
| dynamic f([@
|
| - a/*location: test.dart;a?*/ dynamic x = null]) {}
|
| + a/*location: test.dart;a?*/ dynamic x]) {}
|
| ''');
|
| } else {
|
| checkElementText(library, r'''
|
| const dynamic a = null;
|
| dynamic f([@
|
| - a/*location: test.dart;a?*/ dynamic x = null]) {}
|
| + a/*location: test.dart;a?*/ dynamic x]) {}
|
| ''');
|
| }
|
| }
|
|
|