From e88020be9abeb79a73ce715a6bdd1f2a12d94223 Mon Sep 17 00:00:00 2001 From: Johnni Winther Date: Wed, 27 Nov 2024 10:18:50 +0000 Subject: [PATCH] [cfe] Add _PreBuilder This moves the checking of duplicates, member/setter, and static/instance conflicts to a _PreBuilder. Change-Id: I85f33750c1579676696223d1b19019887ae41e50 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/397163 Reviewed-by: Erik Ernst Commit-Queue: Johnni Winther --- .../lib/src/messages/codes_generated.dart | 542 +++++++- .../lib/src/base/uri_translator.dart | 4 +- pkg/front_end/lib/src/fragment/field.dart | 5 +- .../src/kernel/hierarchy/members_node.dart | 48 - .../lib/src/source/outline_builder.dart | 1 - .../lib/src/source/source_builder_mixins.dart | 48 - .../lib/src/source/source_class_builder.dart | 10 +- ...ce_extension_type_declaration_builder.dart | 6 +- .../src/source/source_library_builder.dart | 85 -- .../source/type_parameter_scope_builder.dart | 1209 +++++++++++++++-- pkg/front_end/messages.status | 7 - pkg/front_end/messages.yaml | 120 +- .../test/coverage_suite_expected.dart | 18 +- .../test/spell_checking_list_code.txt | 4 + .../duplicate_typedefs.dart.strong.expect | 12 +- ...licate_typedefs.dart.strong.modular.expect | 12 +- ...licate_typedefs.dart.strong.outline.expect | 12 +- ...te_typedefs.dart.strong.transformed.expect | 12 +- ...ructor_vs_static_member.dart.strong.expect | 56 +- ...s_static_member.dart.strong.modular.expect | 56 +- ...s_static_member.dart.strong.outline.expect | 56 +- ...atic_member.dart.strong.transformed.expect | 56 +- .../implements_conflicts.dart.strong.expect | 16 +- ...ments_conflicts.dart.strong.modular.expect | 16 +- ...ments_conflicts.dart.strong.outline.expect | 16 +- ...s_conflicts.dart.strong.transformed.expect | 16 +- ...tension_member_conflict.dart.strong.expect | 36 +- ...member_conflict.dart.strong.modular.expect | 36 +- ...member_conflict.dart.strong.outline.expect | 36 +- ...er_conflict.dart.strong.transformed.expect | 36 +- .../extensions/issue38713.dart.strong.expect | 18 +- .../issue38713.dart.strong.modular.expect | 18 +- .../issue38713.dart.strong.outline.expect | 18 +- .../issue38713.dart.strong.transformed.expect | 18 +- .../extensions/issue38745.dart.strong.expect | 9 +- .../issue38745.dart.strong.modular.expect | 9 +- .../issue38745.dart.strong.outline.expect | 9 +- .../issue38745.dart.strong.transformed.expect | 9 +- .../testcases/general/const_vs_setter.dart | 20 + .../const_vs_setter.dart.strong.expect | 42 + ...const_vs_setter.dart.strong.modular.expect | 42 + ...const_vs_setter.dart.strong.outline.expect | 40 + ...t_vs_setter.dart.strong.transformed.expect | 42 + ...onst_vs_setter.dart.textual_outline.expect | 16 + ...etter.dart.textual_outline_modelled.expect | 16 + ...duplicated_declarations.dart.strong.expect | 44 +- ...ed_declarations.dart.strong.modular.expect | 44 +- ...ed_declarations.dart.strong.outline.expect | 44 +- ...eclarations.dart.strong.transformed.expect | 44 +- .../class_header.dart.strong.expect | 280 ++-- .../class_header.dart.strong.modular.expect | 280 ++-- .../class_header.dart.strong.outline.expect | 280 ++-- ...lass_header.dart.strong.transformed.expect | 280 ++-- ..._bad_name_general.crash_dart.strong.expect | 54 +- ...e_general.crash_dart.strong.modular.expect | 54 +- ...e_general.crash_dart.strong.outline.expect | 50 +- ...neral.crash_dart.strong.transformed.expect | 54 +- ...recovery_operator.crash_dart.strong.expect | 8 +- ..._operator.crash_dart.strong.modular.expect | 8 +- ..._operator.crash_dart.strong.outline.expect | 8 +- ...rator.crash_dart.strong.transformed.expect | 8 +- .../hierarchy/conflict.dart.strong.expect | 14 +- .../conflict.dart.strong.modular.expect | 14 +- .../conflict.dart.strong.outline.expect | 14 +- .../general/issue41842.dart.strong.expect | 24 +- .../issue41842.dart.strong.modular.expect | 24 +- .../issue41842.dart.strong.outline.expect | 24 +- .../issue41842.dart.strong.transformed.expect | 24 +- .../macros/augment_class.dart.strong.expect | 10 +- .../augment_class.dart.strong.modular.expect | 10 +- .../augment_class.dart.strong.outline.expect | 10 +- ...gment_class.dart.strong.transformed.expect | 10 +- .../duplicates_instance.dart.strong.expect | 68 +- ...icates_instance.dart.strong.modular.expect | 68 +- ...icates_instance.dart.strong.outline.expect | 68 +- ...es_instance.dart.strong.transformed.expect | 68 +- ...ates_instance_extension.dart.strong.expect | 80 +- ...tance_extension.dart.strong.modular.expect | 80 +- ...tance_extension.dart.strong.outline.expect | 80 +- ...e_extension.dart.strong.transformed.expect | 80 +- .../nnbd/duplicates_static.dart.strong.expect | 68 +- ...plicates_static.dart.strong.modular.expect | 68 +- ...plicates_static.dart.strong.outline.expect | 68 +- ...ates_static.dart.strong.transformed.expect | 68 +- ...icates_static_extension.dart.strong.expect | 80 +- ...tatic_extension.dart.strong.modular.expect | 80 +- ...tatic_extension.dart.strong.outline.expect | 80 +- ...c_extension.dart.strong.transformed.expect | 80 +- .../duplicates_toplevel.dart.strong.expect | 80 +- ...icates_toplevel.dart.strong.modular.expect | 80 +- ...icates_toplevel.dart.strong.outline.expect | 80 +- ...es_toplevel.dart.strong.transformed.expect | 80 +- .../field_setter_conflict.dart.strong.expect | 16 +- ...setter_conflict.dart.strong.modular.expect | 16 +- ...setter_conflict.dart.strong.outline.expect | 16 +- ...er_conflict.dart.strong.transformed.expect | 16 +- .../nnbd/field_vs_setter.dart.strong.expect | 782 +++++------ ...field_vs_setter.dart.strong.modular.expect | 782 +++++------ ...field_vs_setter.dart.strong.outline.expect | 775 +++++------ ...d_vs_setter.dart.strong.transformed.expect | 782 +++++------ .../instance_duplicates.dart.strong.expect | 256 ++-- ...ance_duplicates.dart.strong.modular.expect | 256 ++-- ...ance_duplicates.dart.strong.outline.expect | 216 ++- ..._duplicates.dart.strong.transformed.expect | 256 ++-- .../nonfield_vs_setter.dart.strong.expect | 109 +- ...field_vs_setter.dart.strong.modular.expect | 109 +- ...field_vs_setter.dart.strong.outline.expect | 109 +- ...d_vs_setter.dart.strong.transformed.expect | 109 +- ..._not_shadowed_by_method.dart.strong.expect | 4 +- ...dowed_by_method.dart.strong.modular.expect | 4 +- ...dowed_by_method.dart.strong.outline.expect | 4 +- ...d_by_method.dart.strong.transformed.expect | 4 +- .../testcases/rasta/super.dart.strong.expect | 4 +- .../rasta/super.dart.strong.modular.expect | 4 +- .../rasta/super.dart.strong.outline.expect | 4 +- .../super.dart.strong.transformed.expect | 4 +- ...utf_16_le_content.crash_dart.strong.expect | Bin 258489 -> 258124 bytes ...e_content.crash_dart.strong.modular.expect | Bin 258489 -> 258124 bytes ...e_content.crash_dart.strong.outline.expect | Bin 231109 -> 230744 bytes ...ntent.crash_dart.strong.transformed.expect | Bin 258489 -> 258124 bytes ...ion_internal_name_conflict_error_test.dart | 30 +- tests/language/field/field1_test.dart | 2 - tests/language/field/field2_test.dart | 3 - .../regress/regress33235_01_test.dart | 4 +- .../regress/regress33235_02_test.dart | 4 +- .../regress/regress33235_03_test.dart | 4 +- .../regress/regress33235_07_test.dart | 2 + .../regress/regress33235_10_test.dart | 2 + .../regress/regress33235_11_test.dart | 2 +- .../regress/regress33235_12_test.dart | 2 + .../regress/regress33235_13_test.dart | 2 + .../regress/regress33235_16_test.dart | 2 +- tests/language/setter/setter4_test.dart | 2 +- .../language/unsorted/bad_override_test.dart | 3 + 134 files changed, 5720 insertions(+), 5116 deletions(-) create mode 100644 pkg/front_end/testcases/general/const_vs_setter.dart create mode 100644 pkg/front_end/testcases/general/const_vs_setter.dart.strong.expect create mode 100644 pkg/front_end/testcases/general/const_vs_setter.dart.strong.modular.expect create mode 100644 pkg/front_end/testcases/general/const_vs_setter.dart.strong.outline.expect create mode 100644 pkg/front_end/testcases/general/const_vs_setter.dart.strong.transformed.expect create mode 100644 pkg/front_end/testcases/general/const_vs_setter.dart.textual_outline.expect create mode 100644 pkg/front_end/testcases/general/const_vs_setter.dart.textual_outline_modelled.expect diff --git a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart index 64bfd457eab1..58931419ee03 100644 --- a/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart +++ b/pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart @@ -1481,55 +1481,6 @@ Message _withArgumentsConflictingModifiers(String string, String string2) { ); } -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template templateConflictsWithConstructor = - const Template( - "ConflictsWithConstructor", - problemMessageTemplate: r"""Conflicts with constructor '#name'.""", - withArguments: _withArgumentsConflictsWithConstructor, - ); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code codeConflictsWithConstructor = - const Code( - "ConflictsWithConstructor", - analyzerCodes: ["CONFLICTS_WITH_CONSTRUCTOR"], - ); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsConflictsWithConstructor(String name) { - if (name.isEmpty) throw 'No name provided'; - name = demangleMixinApplicationName(name); - return new Message( - codeConflictsWithConstructor, - problemMessage: """Conflicts with constructor '${name}'.""", - arguments: {'name': name}, - ); -} - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template templateConflictsWithFactory = - const Template( - "ConflictsWithFactory", - problemMessageTemplate: r"""Conflicts with factory '#name'.""", - withArguments: _withArgumentsConflictsWithFactory, - ); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code codeConflictsWithFactory = - const Code("ConflictsWithFactory"); - -// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsConflictsWithFactory(String name) { - if (name.isEmpty) throw 'No name provided'; - name = demangleMixinApplicationName(name); - return new Message( - codeConflictsWithFactory, - problemMessage: """Conflicts with factory '${name}'.""", - arguments: {'name': name}, - ); -} - // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateConflictsWithImplicitSetter = @@ -1560,27 +1511,28 @@ Message _withArgumentsConflictsWithImplicitSetter(String name) { } // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Template templateConflictsWithMember = +const Template +templateConflictsWithImplicitSetterCause = const Template( - "ConflictsWithMember", - problemMessageTemplate: r"""Conflicts with member '#name'.""", - withArguments: _withArgumentsConflictsWithMember, + "ConflictsWithImplicitSetterCause", + problemMessageTemplate: r"""Field '#name' with the implicit setter.""", + withArguments: _withArgumentsConflictsWithImplicitSetterCause, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -const Code codeConflictsWithMember = +const Code codeConflictsWithImplicitSetterCause = const Code( - "ConflictsWithMember", - analyzerCodes: ["CONFLICTS_WITH_MEMBER"], + "ConflictsWithImplicitSetterCause", + severity: Severity.context, ); // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. -Message _withArgumentsConflictsWithMember(String name) { +Message _withArgumentsConflictsWithImplicitSetterCause(String name) { if (name.isEmpty) throw 'No name provided'; name = demangleMixinApplicationName(name); return new Message( - codeConflictsWithMember, - problemMessage: """Conflicts with member '${name}'.""", + codeConflictsWithImplicitSetterCause, + problemMessage: """Field '${name}' with the implicit setter.""", arguments: {'name': name}, ); } @@ -1611,6 +1563,32 @@ Message _withArgumentsConflictsWithSetter(String name) { ); } +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Template templateConflictsWithSetterCause = + const Template( + "ConflictsWithSetterCause", + problemMessageTemplate: r"""Conflicting setter '#name'.""", + withArguments: _withArgumentsConflictsWithSetterCause, + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Code codeConflictsWithSetterCause = + const Code( + "ConflictsWithSetterCause", + severity: Severity.context, + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +Message _withArgumentsConflictsWithSetterCause(String name) { + if (name.isEmpty) throw 'No name provided'; + name = demangleMixinApplicationName(name); + return new Message( + codeConflictsWithSetterCause, + problemMessage: """Conflicting setter '${name}'.""", + arguments: {'name': name}, + ); +} + // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateConflictsWithTypeParameter = @@ -2266,6 +2244,62 @@ const MessageCode messageConstMethod = const MessageCode( correctionMessage: r"""Try removing the 'const' keyword.""", ); +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Template +templateConstructorConflictsWithMember = + const Template( + "ConstructorConflictsWithMember", + problemMessageTemplate: + r"""The constructor conflicts with member '#name'.""", + withArguments: _withArgumentsConstructorConflictsWithMember, + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Code codeConstructorConflictsWithMember = + const Code( + "ConstructorConflictsWithMember", + analyzerCodes: ["CONFLICTS_WITH_MEMBER"], + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +Message _withArgumentsConstructorConflictsWithMember(String name) { + if (name.isEmpty) throw 'No name provided'; + name = demangleMixinApplicationName(name); + return new Message( + codeConstructorConflictsWithMember, + problemMessage: """The constructor conflicts with member '${name}'.""", + arguments: {'name': name}, + ); +} + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Template +templateConstructorConflictsWithMemberCause = + const Template( + "ConstructorConflictsWithMemberCause", + problemMessageTemplate: r"""Conflicting member '#name'.""", + withArguments: _withArgumentsConstructorConflictsWithMemberCause, + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Code +codeConstructorConflictsWithMemberCause = + const Code( + "ConstructorConflictsWithMemberCause", + severity: Severity.context, + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +Message _withArgumentsConstructorConflictsWithMemberCause(String name) { + if (name.isEmpty) throw 'No name provided'; + name = demangleMixinApplicationName(name); + return new Message( + codeConstructorConflictsWithMemberCause, + problemMessage: """Conflicting member '${name}'.""", + arguments: {'name': name}, + ); +} + // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeConstructorCyclic = messageConstructorCyclic; @@ -2762,6 +2796,62 @@ ${string}""", ); } +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Template +templateDeclarationConflictsWithSetter = + const Template( + "DeclarationConflictsWithSetter", + problemMessageTemplate: + r"""The declaration conflicts with setter '#name'.""", + withArguments: _withArgumentsDeclarationConflictsWithSetter, + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Code codeDeclarationConflictsWithSetter = + const Code( + "DeclarationConflictsWithSetter", + analyzerCodes: ["CONFLICTS_WITH_MEMBER"], + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +Message _withArgumentsDeclarationConflictsWithSetter(String name) { + if (name.isEmpty) throw 'No name provided'; + name = demangleMixinApplicationName(name); + return new Message( + codeDeclarationConflictsWithSetter, + problemMessage: """The declaration conflicts with setter '${name}'.""", + arguments: {'name': name}, + ); +} + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Template +templateDeclarationConflictsWithSetterCause = + const Template( + "DeclarationConflictsWithSetterCause", + problemMessageTemplate: r"""Conflicting setter '#name'.""", + withArguments: _withArgumentsDeclarationConflictsWithSetterCause, + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Code +codeDeclarationConflictsWithSetterCause = + const Code( + "DeclarationConflictsWithSetterCause", + severity: Severity.context, + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +Message _withArgumentsDeclarationConflictsWithSetterCause(String name) { + if (name.isEmpty) throw 'No name provided'; + name = demangleMixinApplicationName(name); + return new Message( + codeDeclarationConflictsWithSetterCause, + problemMessage: """Conflicting setter '${name}'.""", + arguments: {'name': name}, + ); +} + // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeDeclaredMemberConflictsWithInheritedMember = messageDeclaredMemberConflictsWithInheritedMember; @@ -5609,6 +5699,60 @@ Message _withArgumentsExtraneousModifierInPrimaryConstructor(Token token) { ); } +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Template +templateFactoryConflictsWithMember = + const Template( + "FactoryConflictsWithMember", + problemMessageTemplate: r"""The factory conflicts with member '#name'.""", + withArguments: _withArgumentsFactoryConflictsWithMember, + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Code codeFactoryConflictsWithMember = + const Code( + "FactoryConflictsWithMember", + analyzerCodes: ["CONFLICTS_WITH_MEMBER"], + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +Message _withArgumentsFactoryConflictsWithMember(String name) { + if (name.isEmpty) throw 'No name provided'; + name = demangleMixinApplicationName(name); + return new Message( + codeFactoryConflictsWithMember, + problemMessage: """The factory conflicts with member '${name}'.""", + arguments: {'name': name}, + ); +} + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Template +templateFactoryConflictsWithMemberCause = + const Template( + "FactoryConflictsWithMemberCause", + problemMessageTemplate: r"""Conflicting member '#name'.""", + withArguments: _withArgumentsFactoryConflictsWithMemberCause, + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Code codeFactoryConflictsWithMemberCause = + const Code( + "FactoryConflictsWithMemberCause", + severity: Severity.context, + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +Message _withArgumentsFactoryConflictsWithMemberCause(String name) { + if (name.isEmpty) throw 'No name provided'; + name = demangleMixinApplicationName(name); + return new Message( + codeFactoryConflictsWithMemberCause, + problemMessage: """Conflicting member '${name}'.""", + arguments: {'name': name}, + ); +} + // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeFactoryNotSync = messageFactoryNotSync; @@ -8385,6 +8529,63 @@ Message _withArgumentsInstanceAndSynthesizedStaticConflict(String name) { ); } +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Template +templateInstanceConflictsWithStatic = const Template< + Message Function(String name) +>( + "InstanceConflictsWithStatic", + problemMessageTemplate: + r"""Instance property '#name' conflicts with static property of the same name.""", + withArguments: _withArgumentsInstanceConflictsWithStatic, +); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Code codeInstanceConflictsWithStatic = + const Code( + "InstanceConflictsWithStatic", + analyzerCodes: ["CONFLICTS_WITH_MEMBER"], + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +Message _withArgumentsInstanceConflictsWithStatic(String name) { + if (name.isEmpty) throw 'No name provided'; + name = demangleMixinApplicationName(name); + return new Message( + codeInstanceConflictsWithStatic, + problemMessage: + """Instance property '${name}' conflicts with static property of the same name.""", + arguments: {'name': name}, + ); +} + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Template +templateInstanceConflictsWithStaticCause = + const Template( + "InstanceConflictsWithStaticCause", + problemMessageTemplate: r"""Conflicting static property '#name'.""", + withArguments: _withArgumentsInstanceConflictsWithStaticCause, + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Code codeInstanceConflictsWithStaticCause = + const Code( + "InstanceConflictsWithStaticCause", + severity: Severity.context, + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +Message _withArgumentsInstanceConflictsWithStaticCause(String name) { + if (name.isEmpty) throw 'No name provided'; + name = demangleMixinApplicationName(name); + return new Message( + codeInstanceConflictsWithStaticCause, + problemMessage: """Conflicting static property '${name}'.""", + arguments: {'name': name}, + ); +} + // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateInstantiationTooFewArguments = @@ -11592,6 +11793,116 @@ const MessageCode messageMapPatternTypeArgumentMismatch = const MessageCode( problemMessage: r"""A map pattern requires exactly two type arguments.""", ); +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Template +templateMemberConflictsWithConstructor = + const Template( + "MemberConflictsWithConstructor", + problemMessageTemplate: + r"""The member conflicts with constructor '#name'.""", + withArguments: _withArgumentsMemberConflictsWithConstructor, + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Code codeMemberConflictsWithConstructor = + const Code( + "MemberConflictsWithConstructor", + analyzerCodes: ["CONFLICTS_WITH_MEMBER"], + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +Message _withArgumentsMemberConflictsWithConstructor(String name) { + if (name.isEmpty) throw 'No name provided'; + name = demangleMixinApplicationName(name); + return new Message( + codeMemberConflictsWithConstructor, + problemMessage: """The member conflicts with constructor '${name}'.""", + arguments: {'name': name}, + ); +} + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Template +templateMemberConflictsWithConstructorCause = + const Template( + "MemberConflictsWithConstructorCause", + problemMessageTemplate: r"""Conflicting constructor '#name'.""", + withArguments: _withArgumentsMemberConflictsWithConstructorCause, + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Code +codeMemberConflictsWithConstructorCause = + const Code( + "MemberConflictsWithConstructorCause", + severity: Severity.context, + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +Message _withArgumentsMemberConflictsWithConstructorCause(String name) { + if (name.isEmpty) throw 'No name provided'; + name = demangleMixinApplicationName(name); + return new Message( + codeMemberConflictsWithConstructorCause, + problemMessage: """Conflicting constructor '${name}'.""", + arguments: {'name': name}, + ); +} + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Template +templateMemberConflictsWithFactory = + const Template( + "MemberConflictsWithFactory", + problemMessageTemplate: r"""The member conflicts with factory '#name'.""", + withArguments: _withArgumentsMemberConflictsWithFactory, + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Code codeMemberConflictsWithFactory = + const Code( + "MemberConflictsWithFactory", + analyzerCodes: ["CONFLICTS_WITH_MEMBER"], + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +Message _withArgumentsMemberConflictsWithFactory(String name) { + if (name.isEmpty) throw 'No name provided'; + name = demangleMixinApplicationName(name); + return new Message( + codeMemberConflictsWithFactory, + problemMessage: """The member conflicts with factory '${name}'.""", + arguments: {'name': name}, + ); +} + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Template +templateMemberConflictsWithFactoryCause = + const Template( + "MemberConflictsWithFactoryCause", + problemMessageTemplate: r"""Conflicting factory '#name'.""", + withArguments: _withArgumentsMemberConflictsWithFactoryCause, + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Code codeMemberConflictsWithFactoryCause = + const Code( + "MemberConflictsWithFactoryCause", + severity: Severity.context, + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +Message _withArgumentsMemberConflictsWithFactoryCause(String name) { + if (name.isEmpty) throw 'No name provided'; + name = demangleMixinApplicationName(name); + return new Message( + codeMemberConflictsWithFactoryCause, + problemMessage: """Conflicting factory '${name}'.""", + arguments: {'name': name}, + ); +} + // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Template templateMemberNotFound = const Template( @@ -15226,6 +15537,62 @@ messageSetOrMapLiteralTooManyTypeArguments = const MessageCode( r"""A set or map literal requires exactly one or two type arguments, respectively.""", ); +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Template +templateSetterConflictsWithDeclaration = + const Template( + "SetterConflictsWithDeclaration", + problemMessageTemplate: + r"""The setter conflicts with declaration '#name'.""", + withArguments: _withArgumentsSetterConflictsWithDeclaration, + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Code codeSetterConflictsWithDeclaration = + const Code( + "SetterConflictsWithDeclaration", + analyzerCodes: ["CONFLICTS_WITH_MEMBER"], + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +Message _withArgumentsSetterConflictsWithDeclaration(String name) { + if (name.isEmpty) throw 'No name provided'; + name = demangleMixinApplicationName(name); + return new Message( + codeSetterConflictsWithDeclaration, + problemMessage: """The setter conflicts with declaration '${name}'.""", + arguments: {'name': name}, + ); +} + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Template +templateSetterConflictsWithDeclarationCause = + const Template( + "SetterConflictsWithDeclarationCause", + problemMessageTemplate: r"""Conflicting declaration '#name'.""", + withArguments: _withArgumentsSetterConflictsWithDeclarationCause, + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Code +codeSetterConflictsWithDeclarationCause = + const Code( + "SetterConflictsWithDeclarationCause", + severity: Severity.context, + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +Message _withArgumentsSetterConflictsWithDeclarationCause(String name) { + if (name.isEmpty) throw 'No name provided'; + name = demangleMixinApplicationName(name); + return new Message( + codeSetterConflictsWithDeclarationCause, + problemMessage: """Conflicting declaration '${name}'.""", + arguments: {'name': name}, + ); +} + // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeSetterConstructor = messageSetterConstructor; @@ -15438,6 +15805,63 @@ const MessageCode messageStaticAndInstanceConflictCause = const MessageCode( problemMessage: r"""This is the instance member.""", ); +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Template +templateStaticConflictsWithInstance = const Template< + Message Function(String name) +>( + "StaticConflictsWithInstance", + problemMessageTemplate: + r"""Static property '#name' conflicts with instance property of the same name.""", + withArguments: _withArgumentsStaticConflictsWithInstance, +); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Code codeStaticConflictsWithInstance = + const Code( + "StaticConflictsWithInstance", + analyzerCodes: ["CONFLICTS_WITH_MEMBER"], + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +Message _withArgumentsStaticConflictsWithInstance(String name) { + if (name.isEmpty) throw 'No name provided'; + name = demangleMixinApplicationName(name); + return new Message( + codeStaticConflictsWithInstance, + problemMessage: + """Static property '${name}' conflicts with instance property of the same name.""", + arguments: {'name': name}, + ); +} + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Template +templateStaticConflictsWithInstanceCause = + const Template( + "StaticConflictsWithInstanceCause", + problemMessageTemplate: r"""Conflicting instance property '#name'.""", + withArguments: _withArgumentsStaticConflictsWithInstanceCause, + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +const Code codeStaticConflictsWithInstanceCause = + const Code( + "StaticConflictsWithInstanceCause", + severity: Severity.context, + ); + +// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. +Message _withArgumentsStaticConflictsWithInstanceCause(String name) { + if (name.isEmpty) throw 'No name provided'; + name = demangleMixinApplicationName(name); + return new Message( + codeStaticConflictsWithInstanceCause, + problemMessage: """Conflicting instance property '${name}'.""", + arguments: {'name': name}, + ); +} + // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. const Code codeStaticConstructor = messageStaticConstructor; diff --git a/pkg/front_end/lib/src/base/uri_translator.dart b/pkg/front_end/lib/src/base/uri_translator.dart index f62b074461d8..3949ecc01489 100644 --- a/pkg/front_end/lib/src/base/uri_translator.dart +++ b/pkg/front_end/lib/src/base/uri_translator.dart @@ -67,9 +67,7 @@ class UriTranslator { : _packageUriNotFoundNoReport)(uri); } return translated; - } - // Coverage-ignore(suite): Not run. - on ArgumentError catch (e) { + } on ArgumentError catch (e) { // TODO(sigmund): catch a more precise error when // https://github.com/dart-lang/package_config/issues/40 is fixed. if (reportMessage) { diff --git a/pkg/front_end/lib/src/fragment/field.dart b/pkg/front_end/lib/src/fragment/field.dart index 1737fd74aef8..075e983da57c 100644 --- a/pkg/front_end/lib/src/fragment/field.dart +++ b/pkg/front_end/lib/src/fragment/field.dart @@ -34,9 +34,10 @@ class FieldFragment implements Fragment { : _initializerToken = initializerToken, _constInitializerToken = constInitializerToken; - // Coverage-ignore(suite): Not run. bool get hasSetter { - if (modifiers.isFinal) { + if (modifiers.isConst) { + return false; + } else if (modifiers.isFinal) { if (modifiers.isLate) { return !modifiers.hasInitializer; } else { diff --git a/pkg/front_end/lib/src/kernel/hierarchy/members_node.dart b/pkg/front_end/lib/src/kernel/hierarchy/members_node.dart index ac0845fdb820..1c451c7ac2cf 100644 --- a/pkg/front_end/lib/src/kernel/hierarchy/members_node.dart +++ b/pkg/front_end/lib/src/kernel/hierarchy/members_node.dart @@ -22,8 +22,6 @@ import '../../base/messages.dart' templateCantInferTypesDueToNoCombinedSignature, templateCantInferReturnTypeDueToNoCombinedSignature, templateCantInferTypeDueToNoCombinedSignature, - templateDuplicatedDeclaration, - templateDuplicatedDeclarationCause, templateInstanceAndSynthesizedStaticConflict, templateMissingImplementationCause, templateMissingImplementationNotAbstract; @@ -135,52 +133,6 @@ abstract class MembersNodeBuilder { name.length, instanceMember.fileUri); } - } else { - // This message can be reported twice (when merging localMembers with - // classSetters, or localSetters with classMembers). By ensuring that - // we always report the one with higher charOffset as the duplicate, - // the message duplication logic ensures that we only report this - // problem once. - ClassMember existing; - ClassMember duplicate; - assert(a.fileUri == b.fileUri || - // Coverage-ignore(suite): Not run. - a.name.text == "toString" && - (a.fileUri.isScheme("org-dartlang-sdk") && - a.fileUri.pathSegments.isNotEmpty && - a.fileUri.pathSegments.last == "enum.dart" || - b.fileUri.isScheme("org-dartlang-sdk") && - b.fileUri.pathSegments.isNotEmpty && - b.fileUri.pathSegments.last == "enum.dart")); - - if (a.fileUri != b.fileUri) { - // Coverage-ignore-block(suite): Not run. - if (a.fileUri.isScheme("org-dartlang-sdk")) { - existing = a; - duplicate = b; - } else { - assert(b.fileUri.isScheme("org-dartlang-sdk")); - existing = b; - duplicate = a; - } - } else { - if (a.charOffset < b.charOffset) { - existing = a; - duplicate = b; - } else { - existing = b; - duplicate = a; - } - } - declarationBuilder.libraryBuilder.addProblem( - templateDuplicatedDeclaration.withArguments(name), - duplicate.charOffset, - name.length, - duplicate.fileUri, - context: [ - templateDuplicatedDeclarationCause.withArguments(name).withLocation( - existing.fileUri, existing.charOffset, name.length) - ]); } } } diff --git a/pkg/front_end/lib/src/source/outline_builder.dart b/pkg/front_end/lib/src/source/outline_builder.dart index 5720b2b473cf..8e76559cde63 100644 --- a/pkg/front_end/lib/src/source/outline_builder.dart +++ b/pkg/front_end/lib/src/source/outline_builder.dart @@ -2888,7 +2888,6 @@ class OutlineBuilder extends StackListenerImpl { if (identifier is Identifier) { if (enumConstantInfos == null) { if (!leftBrace.isSynthetic) { - // Coverage-ignore-block(suite): Not run. addProblem(messageEnumDeclarationEmpty, identifier.token.offset, identifier.token.length); } diff --git a/pkg/front_end/lib/src/source/source_builder_mixins.dart b/pkg/front_end/lib/src/source/source_builder_mixins.dart index 81867d642255..637b40c00671 100644 --- a/pkg/front_end/lib/src/source/source_builder_mixins.dart +++ b/pkg/front_end/lib/src/source/source_builder_mixins.dart @@ -14,7 +14,6 @@ import '../builder/builder_mixins.dart'; import '../builder/declaration_builders.dart'; import '../builder/library_builder.dart'; import '../builder/member_builder.dart'; -import '../builder/name_iterator.dart'; import '../builder/procedure_builder.dart'; import '../builder/type_builder.dart'; import '../kernel/body_builder_context.dart'; @@ -55,10 +54,6 @@ mixin SourceDeclarationBuilderMixin /// library. void buildInternal(LibraryBuilder coreLibrary, {required bool addMembersToLibrary}) { - SourceLibraryBuilder.checkMemberConflicts(libraryBuilder, nameSpace, - checkForInstanceVsStaticConflict: true, - checkForMethodVsSetterConflict: true); - ClassBuilder objectClassBuilder = coreLibrary.lookupLocalMember('Object', required: true) as ClassBuilder; @@ -306,46 +301,3 @@ mixin SourceDeclarationBuilderMixin @override int get typeParametersCount => typeParameters?.length ?? 0; } - -mixin SourceTypedDeclarationBuilderMixin implements IDeclarationBuilder { - /// Checks for conflicts between constructors and static members declared - /// in this type declaration. - void checkConstructorStaticConflict() { - NameIterator iterator = - nameSpace.filteredConstructorNameIterator( - includeDuplicates: false, includeAugmentations: true); - while (iterator.moveNext()) { - String name = iterator.name; - MemberBuilder constructor = iterator.current; - Builder? member = nameSpace.lookupLocalMember(name, setter: false); - if (member == null) continue; - if (!member.isStatic) continue; - // TODO(ahe): Revisit these messages. It seems like the last two should - // be `context` parameter to this message. - addProblem(templateConflictsWithMember.withArguments(name), - constructor.fileOffset, noLength); - if (constructor.isFactory) { - addProblem( - templateConflictsWithFactory.withArguments("${this.name}.${name}"), - member.fileOffset, - noLength); - } else { - addProblem( - templateConflictsWithConstructor - .withArguments("${this.name}.${name}"), - member.fileOffset, - noLength); - } - } - - nameSpace.forEachLocalSetter((String name, Builder setter) { - Builder? constructor = nameSpace.lookupConstructor(name); - if (constructor == null || !setter.isStatic) return; - // Coverage-ignore-block(suite): Not run. - addProblem(templateConflictsWithConstructor.withArguments(name), - setter.fileOffset, noLength); - addProblem(templateConflictsWithSetter.withArguments(name), - constructor.fileOffset, noLength); - }); - } -} diff --git a/pkg/front_end/lib/src/source/source_class_builder.dart b/pkg/front_end/lib/src/source/source_class_builder.dart index a623038b7cbc..f475e4288eec 100644 --- a/pkg/front_end/lib/src/source/source_class_builder.dart +++ b/pkg/front_end/lib/src/source/source_class_builder.dart @@ -86,7 +86,7 @@ Class initializeClass( } class SourceClassBuilder extends ClassBuilderImpl - with ClassDeclarationMixin, SourceTypedDeclarationBuilderMixin + with ClassDeclarationMixin implements Comparable, ClassDeclaration, @@ -280,12 +280,6 @@ class SourceClassBuilder extends ClassBuilderImpl SourceLibraryBuilder get parent => libraryBuilder; Class build(LibraryBuilder coreLibrary) { - SourceLibraryBuilder.checkMemberConflicts(libraryBuilder, nameSpace, - // These checks are performed as part of the class hierarchy - // computation. - checkForInstanceVsStaticConflict: false, - checkForMethodVsSetterConflict: false); - void buildBuilders(Builder declaration) { if (declaration.parent != this) { if (declaration.parent?.origin != origin) { @@ -403,8 +397,6 @@ class SourceClassBuilder extends ClassBuilderImpl } } - checkConstructorStaticConflict(); - cls.procedures.sort(compareProcedures); return cls; } diff --git a/pkg/front_end/lib/src/source/source_extension_type_declaration_builder.dart b/pkg/front_end/lib/src/source/source_extension_type_declaration_builder.dart index c281084a0fa8..3a9ca154f85c 100644 --- a/pkg/front_end/lib/src/source/source_extension_type_declaration_builder.dart +++ b/pkg/front_end/lib/src/source/source_extension_type_declaration_builder.dart @@ -42,10 +42,7 @@ import 'type_parameter_scope_builder.dart'; class SourceExtensionTypeDeclarationBuilder extends ExtensionTypeDeclarationBuilderImpl - with - SourceDeclarationBuilderMixin, - ClassDeclarationMixin, - SourceTypedDeclarationBuilderMixin + with SourceDeclarationBuilderMixin, ClassDeclarationMixin implements Comparable, ClassDeclaration { @@ -393,7 +390,6 @@ class SourceExtensionTypeDeclarationBuilder _extensionTypeDeclaration.declaredRepresentationType = representationType; _extensionTypeDeclaration.representationName = representationName; buildInternal(coreLibrary, addMembersToLibrary: addMembersToLibrary); - checkConstructorStaticConflict(); return _extensionTypeDeclaration; } diff --git a/pkg/front_end/lib/src/source/source_library_builder.dart b/pkg/front_end/lib/src/source/source_library_builder.dart index 8d1d1624df3b..a524f426fd3b 100644 --- a/pkg/front_end/lib/src/source/source_library_builder.dart +++ b/pkg/front_end/lib/src/source/source_library_builder.dart @@ -37,7 +37,6 @@ import '../base/uris.dart'; import '../builder/builder.dart'; import '../builder/declaration_builders.dart'; import '../builder/dynamic_type_declaration_builder.dart'; -import '../builder/field_builder.dart'; import '../builder/formal_parameter_builder.dart'; import '../builder/library_builder.dart'; import '../builder/member_builder.dart'; @@ -553,86 +552,6 @@ class SourceLibraryBuilder extends LibraryBuilderImpl { } } - /// Checks [nameSpace] for conflicts between setters and non-setters and - /// reports them in [sourceLibraryBuilder]. - /// - /// If [checkForInstanceVsStaticConflict] is `true`, conflicts between - /// instance and static members of the same name are reported. - /// - /// If [checkForMethodVsSetterConflict] is `true`, conflicts between - /// methods and setters of the same name are reported. - static void checkMemberConflicts( - SourceLibraryBuilder sourceLibraryBuilder, NameSpace nameSpace, - {required bool checkForInstanceVsStaticConflict, - required bool checkForMethodVsSetterConflict}) { - nameSpace.forEachLocalSetter((String name, MemberBuilder setter) { - Builder? getable = nameSpace.lookupLocalMember(name, setter: false); - if (getable == null) { - // Setter without getter. - return; - } - - bool isConflictingSetter = false; - Set conflictingGetables = {}; - for (Builder? currentGetable = getable; - currentGetable != null; - currentGetable = currentGetable.next) { - if (currentGetable is FieldBuilder) { - if (currentGetable.isAssignable) { - // Setter with writable field. - isConflictingSetter = true; - conflictingGetables.add(currentGetable); - } - } else if (checkForMethodVsSetterConflict && !currentGetable.isGetter) { - // Setter with method. - conflictingGetables.add(currentGetable); - } - } - for (SourceMemberBuilderImpl? currentSetter = - setter as SourceMemberBuilderImpl?; - currentSetter != null; - currentSetter = currentSetter.next as SourceMemberBuilderImpl?) { - bool conflict = conflictingGetables.isNotEmpty; - for (Builder? currentGetable = getable; - currentGetable != null; - currentGetable = currentGetable.next) { - if (checkForInstanceVsStaticConflict && - currentGetable.isDeclarationInstanceMember != - currentSetter.isDeclarationInstanceMember) { - conflict = true; - conflictingGetables.add(currentGetable); - } - } - if (isConflictingSetter) { - currentSetter.isConflictingSetter = true; - } - if (conflict) { - if (currentSetter.isConflictingSetter) { - sourceLibraryBuilder.addProblem( - templateConflictsWithImplicitSetter.withArguments(name), - currentSetter.fileOffset, - noLength, - currentSetter.fileUri); - } else { - sourceLibraryBuilder.addProblem( - templateConflictsWithMember.withArguments(name), - currentSetter.fileOffset, - noLength, - currentSetter.fileUri); - } - } - } - for (Builder conflictingGetable in conflictingGetables) { - // TODO(ahe): Context argument to previous message? - sourceLibraryBuilder.addProblem( - templateConflictsWithSetter.withArguments(name), - conflictingGetable.fileOffset, - noLength, - conflictingGetable.fileUri!); - } - }); - } - /// Builds the core AST structure of this library as needed for the outline. Library buildOutlineNodes(LibraryBuilder coreLibrary) { assert(checkState( @@ -658,10 +577,6 @@ class SourceLibraryBuilder extends LibraryBuilderImpl { part.buildOutlineNode(library); }*/ - checkMemberConflicts(this, libraryNameSpace, - checkForInstanceVsStaticConflict: false, - checkForMethodVsSetterConflict: true); - Iterator iterator = localMembersIterator; while (iterator.moveNext()) { _buildOutlineNodes(iterator.current, coreLibrary); diff --git a/pkg/front_end/lib/src/source/type_parameter_scope_builder.dart b/pkg/front_end/lib/src/source/type_parameter_scope_builder.dart index bb98b9f499e7..16336ebcf172 100644 --- a/pkg/front_end/lib/src/source/type_parameter_scope_builder.dart +++ b/pkg/front_end/lib/src/source/type_parameter_scope_builder.dart @@ -31,59 +31,760 @@ import 'source_loader.dart'; import 'source_procedure_builder.dart'; import 'source_type_alias_builder.dart'; +enum _PropertyKind { + Getter, + Setter, + Field, + FinalField, +} + +enum _FragmentKind { + Constructor, + Factory, + Class, + Mixin, + NamedMixinApplication, + Enum, + Extension, + ExtensionType, + Typedef, + Method, + Property, +} + class _FragmentName { + final _FragmentKind kind; + final Fragment fragment; final Uri fileUri; final String name; final int nameOffset; final int nameLength; final bool isAugment; + final bool isStatic; + final _PropertyKind? propertyKind; - _FragmentName( + _FragmentName(this.kind, this.fragment, {required this.fileUri, required this.name, required this.nameOffset, required this.nameLength, - required this.isAugment}); + required this.isAugment, + this.propertyKind, + this.isStatic = true}); } -void _computeBuildersFromFragments(String name, List fragments, - {required ProblemReporting problemReporting, - required SourceLoader loader, - required SourceLibraryBuilder enclosingLibraryBuilder, - DeclarationBuilder? declarationBuilder, - required List unboundNominalVariables, - required Map mixinApplications, - required List<_AddBuilder> builders, - required IndexedLibrary? indexedLibrary, - required ContainerType containerType, - IndexedContainer? indexedContainer, - ContainerName? containerName}) { - // TODO(johnniwinther): Collect introductory and augmenting fragments. - _FragmentName? existingGetable; - _FragmentName? existingSetable; - _FragmentName? existingConstructor; +/// A [_PreBuilder] is a precursor to a [Builder] with subclasses for +/// properties, constructors, and other declarations. +sealed class _PreBuilder { + /// Tries to include [fragmentName] in this [_PreBuilder]. + /// + /// If [fragmentName] can be absorbed, `true` is returned. Otherwise an error + /// is reported and `false` is returned. + bool absorbFragment( + ProblemReporting problemReporting, _FragmentName fragmentName); + + /// Checks with [fragmentName] conflicts with this [_PreBuilder]. + /// + /// This is called between constructors and non-constructors which do not + /// occupy the same name space but can only co-exist if the non-constructor + /// is not static. + void checkFragment( + ProblemReporting problemReporting, _FragmentName fragmentName); + + /// Creates [Builder]s for the fragments absorbed into this [_PreBuilder], + /// using [createBuilder] to create a [Builder] for a single [Fragment]. + /// + /// If `conflictingSetter` is `true`, the created [Builder] must be marked + /// as a conflicting setter. This is needed to ensure that we don't create + /// conflicting AST nodes: Normally we only create [Builder]s for + /// non-duplicate declarations, but because setters are store in a separate + /// map the [NameSpace], they are not directly marked as duplicate if they + /// do not conflict with other setters. + void createBuilders( + void Function(Fragment, {bool conflictingSetter}) createBuilder); +} - void checkGetable(_FragmentName fragmentName) { - if (fragmentName.isAugment) { - // TODO(johnniwinther): Check that an introductory fragment exists and - // collect augmentations. - return; +/// [_PreBuilder] for properties, i.e. fields, getters and setters. +class _PropertyPreBuilder extends _PreBuilder { + final bool isStatic; + _FragmentName? getter; + _FragmentName? setter; + List<_FragmentName> augmentations = []; + List<_FragmentName> conflictingSetters = []; + + // TODO(johnniwinther): Report error if [getter] is augmenting. + _PropertyPreBuilder.forGetter(_FragmentName this.getter) + : isStatic = getter.isStatic; + + // TODO(johnniwinther): Report error if [setter] is augmenting. + _PropertyPreBuilder.forSetter(_FragmentName this.setter) + : isStatic = setter.isStatic; + + // TODO(johnniwinther): Report error if [getter] is augmenting. + _PropertyPreBuilder.forField(_FragmentName this.getter) + : isStatic = getter.isStatic { + if (getter!.propertyKind == _PropertyKind.Field) { + setter = getter; } - if (existingGetable != null) { - problemReporting.addProblem( - templateDuplicatedDeclaration.withArguments(fragmentName.name), - fragmentName.nameOffset, - fragmentName.nameLength, - fragmentName.fileUri, - context: [ - templateDuplicatedDeclarationCause - .withArguments(existingGetable!.name) - .withLocation(existingGetable!.fileUri, - existingGetable!.nameOffset, existingGetable!.nameLength) - ]); + } + + @override + bool absorbFragment( + ProblemReporting problemReporting, _FragmentName fragmentName) { + _PropertyKind? propertyKind = fragmentName.propertyKind; + if (propertyKind != null) { + switch (propertyKind) { + case _PropertyKind.Getter: + if (getter == null) { + // Example: + // + // void set foo(_) {} + // int get foo => 42; + // + if (fragmentName.isAugment) { + // Example: + // + // void set foo(_) {} + // augment int get foo => 42; + // + // TODO(johnniwinther): Report error. + } + if (fragmentName.isStatic != isStatic) { + if (fragmentName.isStatic) { + // Coverage-ignore-block(suite): Not run. + // Example: + // + // class A { + // void set foo(_) {} + // static int get foo => 42; + // } + // + problemReporting.addProblem( + templateStaticConflictsWithInstance + .withArguments(fragmentName.name), + fragmentName.nameOffset, + fragmentName.nameLength, + fragmentName.fileUri, + context: [ + templateStaticConflictsWithInstanceCause + .withArguments(setter!.name) + .withLocation(setter!.fileUri, setter!.nameOffset, + setter!.nameLength) + ]); + } else { + // Example: + // + // class A { + // static void set foo(_) {} + // int get foo => 42; + // } + // + problemReporting.addProblem( + templateInstanceConflictsWithStatic + .withArguments(fragmentName.name), + fragmentName.nameOffset, + fragmentName.nameLength, + fragmentName.fileUri, + context: [ + templateInstanceConflictsWithStaticCause + .withArguments(setter!.name) + .withLocation(setter!.fileUri, setter!.nameOffset, + setter!.nameLength) + ]); + } + return false; + } else { + getter = fragmentName; + return true; + } + } else { + if (fragmentName.isAugment) { + // Coverage-ignore-block(suite): Not run. + // Example: + // + // int get foo => 42; + // augment int get foo => 87; + // + augmentations.add(fragmentName); + return true; + } else { + // Example: + // + // int get foo => 42; + // int get foo => 87; + // + problemReporting.addProblem( + templateDuplicatedDeclaration + .withArguments(fragmentName.name), + fragmentName.nameOffset, + fragmentName.nameLength, + fragmentName.fileUri, + context: [ + templateDuplicatedDeclarationCause + .withArguments(getter!.name) + .withLocation(getter!.fileUri, getter!.nameOffset, + getter!.nameLength) + ]); + return false; + } + } + case _PropertyKind.Setter: + if (setter == null) { + // Examples: + // + // int get foo => 42; + // void set foo(_) {} + // + // final int bar = 42; + // void set bar(_) {} + // + if (fragmentName.isAugment) { + // Example: + // + // int get foo => 42; + // augment void set foo(_) {} + // + // TODO(johnniwinther): Report error. + } + if (fragmentName.isStatic != isStatic) { + if (fragmentName.isStatic) { + // Example: + // + // class A { + // int get foo => 42; + // static void set foo(_) {} + // } + // + problemReporting.addProblem( + templateStaticConflictsWithInstance + .withArguments(fragmentName.name), + fragmentName.nameOffset, + fragmentName.nameLength, + fragmentName.fileUri, + context: [ + templateStaticConflictsWithInstanceCause + .withArguments(getter!.name) + .withLocation(getter!.fileUri, getter!.nameOffset, + getter!.nameLength) + ]); + return false; + } else { + // Example: + // + // class A { + // static int get foo => 42; + // void set foo(_) {} + // } + // + problemReporting.addProblem( + templateInstanceConflictsWithStatic + .withArguments(fragmentName.name), + fragmentName.nameOffset, + fragmentName.nameLength, + fragmentName.fileUri, + context: [ + templateInstanceConflictsWithStaticCause + .withArguments(getter!.name) + .withLocation(getter!.fileUri, getter!.nameOffset, + getter!.nameLength) + ]); + return false; + } + } else { + setter = fragmentName; + return true; + } + } else { + if (fragmentName.isAugment) { + // Example: + // + // void set foo(_) {} + // augment void set foo(_) {} + // + augmentations.add(fragmentName); + return true; + } else { + if (setter!.propertyKind == _PropertyKind.Field) { + // Example: + // + // int? foo; + // void set foo(_) {} + // + problemReporting.addProblem( + templateConflictsWithImplicitSetter + .withArguments(setter!.name), + fragmentName.nameOffset, + fragmentName.nameLength, + fragmentName.fileUri, + context: [ + templateConflictsWithImplicitSetterCause + .withArguments(setter!.name) + .withLocation(setter!.fileUri, setter!.nameOffset, + setter!.nameLength) + ]); + + // Even though we have a conflict we absorb the conflicting + // setter in order to ensure that the created [Builder] is + // marked as a conflicting setter. + // TODO(johnniwinther): Avoid the need for this. + conflictingSetters.add(fragmentName); + return true; + } else { + // Example: + // + // void set foo(_) {} + // void set foo(_) {} + // + problemReporting.addProblem( + templateDuplicatedDeclaration + .withArguments(fragmentName.name), + fragmentName.nameOffset, + fragmentName.nameLength, + fragmentName.fileUri, + context: [ + templateDuplicatedDeclarationCause + .withArguments(setter!.name) + .withLocation(setter!.fileUri, setter!.nameOffset, + setter!.nameLength) + ]); + return false; + } + } + } + case _PropertyKind.Field: + if (getter == null) { + // Example: + // + // void set foo(_) {} + // int? foo; + // + assert(getter == null && setter != null); + // We have an explicit setter. + problemReporting.addProblem( + templateConflictsWithSetter.withArguments(setter!.name), + fragmentName.nameOffset, + fragmentName.nameLength, + fragmentName.fileUri, + context: [ + templateConflictsWithSetterCause + .withArguments(setter!.name) + .withLocation(setter!.fileUri, setter!.nameOffset, + setter!.nameLength) + ]); + + // Even though we have a conflict we absorb the setter and replace + // it with the field in order to ensure that the created setter + // [Builder] is marked as a conflicting setter. + // TODO(johnniwinther): Avoid the need for this. + getter = fragmentName; + conflictingSetters.add(setter!); + setter = fragmentName; + return true; + } else if (setter != null) { + // Examples: + // + // int? foo; + // int? foo; + // + // int get bar => 42; + // void set bar(_) {} + // int bar = 87; + // + // final int baz = 42; + // void set baz(_) {} + // int baz = 87; + // + assert(getter != null && setter != null); + // We have both getter and setter + if (fragmentName.isAugment) { + // Coverage-ignore-block(suite): Not run. + if (getter!.propertyKind == fragmentName.propertyKind) { + // Example: + // + // int foo = 42; + // augment int foo = 87; + // + augmentations.add(fragmentName); + return true; + } else { + // Example: + // + // final int foo = 42; + // void set foo(_) {} + // augment int foo = 87; + // + // TODO(johnniwinther): Report error. + // TODO(johnniwinther): Should the augment be absorbed in this + // case, as an erroneous augmentation? + return false; + } + } else { + // Examples: + // + // int? foo; + // int? foo; + // + // int? get bar => null; + // void set bar(_) {} + // int? bar; + // + problemReporting.addProblem( + templateDuplicatedDeclaration + .withArguments(fragmentName.name), + fragmentName.nameOffset, + fragmentName.nameLength, + fragmentName.fileUri, + context: [ + templateDuplicatedDeclarationCause + .withArguments(getter!.name) + .withLocation(getter!.fileUri, getter!.nameOffset, + getter!.nameLength) + ]); + + return false; + } + } else { + // Examples: + // + // int get foo => 42; + // int? foo; + // + // final int bar = 42; + // int? bar; + // + assert(getter != null && setter == null); + problemReporting.addProblem( + templateDuplicatedDeclaration.withArguments(fragmentName.name), + fragmentName.nameOffset, + fragmentName.nameLength, + fragmentName.fileUri, + context: [ + templateDuplicatedDeclarationCause + .withArguments(getter!.name) + .withLocation(getter!.fileUri, getter!.nameOffset, + getter!.nameLength) + ]); + return false; + } + case _PropertyKind.FinalField: + if (getter == null) { + // Example: + // + // void set foo(_) {} + // final int foo = 42; + // + assert(getter == null && setter != null); + // We have an explicit setter. + if (fragmentName.isAugment) { + // Example: + // + // void set foo(_) {} + // augment final int foo = 42; + // + // TODO(johnniwinther): Report error. + } + if (fragmentName.isStatic != isStatic) { + // Coverage-ignore-block(suite): Not run. + if (fragmentName.isStatic) { + // Example: + // + // class A { + // void set foo(_) {} + // static final int foo = 42; + // } + // + problemReporting.addProblem( + templateStaticConflictsWithInstance + .withArguments(fragmentName.name), + fragmentName.nameOffset, + fragmentName.nameLength, + fragmentName.fileUri, + context: [ + templateStaticConflictsWithInstanceCause + .withArguments(setter!.name) + .withLocation(setter!.fileUri, setter!.nameOffset, + setter!.nameLength) + ]); + return false; + } else { + // Example: + // + // class A { + // static void set foo(_) {} + // final int foo = 42; + // } + // + problemReporting.addProblem( + templateInstanceConflictsWithStatic + .withArguments(fragmentName.name), + fragmentName.nameOffset, + fragmentName.nameLength, + fragmentName.fileUri, + context: [ + templateInstanceConflictsWithStaticCause + .withArguments(setter!.name) + .withLocation(setter!.fileUri, setter!.nameOffset, + setter!.nameLength) + ]); + return false; + } + } else { + getter = fragmentName; + return true; + } + } else { + // Examples: + // + // final int foo = 42; + // final int foo = 87; + // + // int get bar => 42; + // final int bar = 87; + // + if (fragmentName.isAugment) { + // Coverage-ignore-block(suite): Not run. + if (getter!.propertyKind == fragmentName.propertyKind) { + // Example: + // + // final int foo = 42; + // augment final int foo = 87; + // + augmentations.add(fragmentName); + return true; + } else { + // Example: + // + // int foo = 42; + // augment final int foo = 87; + // + // TODO(johnniwinther): Report error. + // TODO(johnniwinther): Should the augment be absorbed in this + // case, as an erroneous augmentation? + return false; + } + } else { + // Examples: + // + // final int foo = 42; + // final int foo = 87; + // + // int get bar => 42; + // final int bar = 87; + // + problemReporting.addProblem( + templateDuplicatedDeclaration + .withArguments(fragmentName.name), + fragmentName.nameOffset, + fragmentName.nameLength, + fragmentName.fileUri, + context: [ + templateDuplicatedDeclarationCause + .withArguments(getter!.name) + .withLocation(getter!.fileUri, getter!.nameOffset, + getter!.nameLength) + ]); + return false; + } + } + } + } else { + if (getter != null) { + // Example: + // + // int get foo => 42; + // void foo() {} + // + problemReporting.addProblem( + templateDuplicatedDeclaration.withArguments(fragmentName.name), + fragmentName.nameOffset, + fragmentName.nameLength, + fragmentName.fileUri, + context: [ + templateDuplicatedDeclarationCause + .withArguments(getter!.name) + .withLocation( + getter!.fileUri, getter!.nameOffset, getter!.nameLength) + ]); + } else { + assert(setter != null); + // Example: + // + // void set foo(_) {} + // void foo() {} + // + problemReporting.addProblem( + templateDeclarationConflictsWithSetter.withArguments(setter!.name), + fragmentName.nameOffset, + fragmentName.nameLength, + fragmentName.fileUri, + context: [ + templateDeclarationConflictsWithSetterCause + .withArguments(setter!.name) + .withLocation( + setter!.fileUri, setter!.nameOffset, setter!.nameLength) + ]); + } + return false; } - // TODO(johnniwinther): Check for conflict with setters. - /*else if (existingSetable != null) { + } + + @override + void checkFragment( + ProblemReporting problemReporting, _FragmentName constructorFragment) { + // Check conflict with constructor. + if (isStatic) { + if (getter != null) { + if (constructorFragment.kind == _FragmentKind.Constructor) { + // Example: + // + // class A { + // static int get foo => 42; + // A.foo(); + // } + // + problemReporting.addProblem( + templateConstructorConflictsWithMember + .withArguments(getter!.name), + constructorFragment.nameOffset, + constructorFragment.nameLength, + constructorFragment.fileUri, + context: [ + templateConstructorConflictsWithMemberCause + .withArguments(getter!.name) + .withLocation( + getter!.fileUri, getter!.nameOffset, getter!.nameLength) + ]); + } else { + // Coverage-ignore-block(suite): Not run. + assert(constructorFragment.kind == _FragmentKind.Factory, + "Unexpected constructor kind $constructorFragment"); + // Example: + // + // class A { + // static int get foo => 42; + // factory A.foo() => throw ''; + // } + // + problemReporting.addProblem( + templateFactoryConflictsWithMember.withArguments(getter!.name), + constructorFragment.nameOffset, + constructorFragment.nameLength, + constructorFragment.fileUri, + context: [ + templateFactoryConflictsWithMemberCause + .withArguments(getter!.name) + .withLocation( + getter!.fileUri, getter!.nameOffset, getter!.nameLength) + ]); + } + } else { + // Coverage-ignore-block(suite): Not run. + if (constructorFragment.kind == _FragmentKind.Constructor) { + // Example: + // + // class A { + // static void set foo(_) {} + // A.foo(); + // } + // + problemReporting.addProblem( + templateConstructorConflictsWithMember + .withArguments(setter!.name), + constructorFragment.nameOffset, + constructorFragment.nameLength, + constructorFragment.fileUri, + context: [ + templateConstructorConflictsWithMemberCause + .withArguments(setter!.name) + .withLocation( + setter!.fileUri, setter!.nameOffset, setter!.nameLength) + ]); + } else { + assert(constructorFragment.kind == _FragmentKind.Factory, + "Unexpected constructor kind $constructorFragment"); + // Example: + // + // class A { + // static void set foo(_) {} + // factory A.foo() => throw ''; + // } + // + problemReporting.addProblem( + templateFactoryConflictsWithMember.withArguments(setter!.name), + constructorFragment.nameOffset, + constructorFragment.nameLength, + constructorFragment.fileUri, + context: [ + templateFactoryConflictsWithMemberCause + .withArguments(setter!.name) + .withLocation( + setter!.fileUri, setter!.nameOffset, setter!.nameLength) + ]); + } + } + } + } + + @override + void createBuilders( + void Function(Fragment, {bool conflictingSetter}) createBuilder) { + if (getter != null) { + createBuilder(getter!.fragment); + } + if (setter != null && setter!.propertyKind == _PropertyKind.Setter) { + createBuilder(setter!.fragment); + } + for (_FragmentName fragmentName in conflictingSetters) { + createBuilder(fragmentName.fragment, conflictingSetter: true); + } + for (_FragmentName fragmentName in augmentations) { + createBuilder(fragmentName.fragment); + } + } +} + +/// [_PreBuilder] for generative and factory constructors. +class _ConstructorPreBuilder extends _PreBuilder { + final _FragmentName fragment; + final List<_FragmentName> augmentations = []; + + // TODO(johnniwinther): Report error if [fragment] is augmenting. + _ConstructorPreBuilder(this.fragment); + + @override + bool absorbFragment( + ProblemReporting problemReporting, _FragmentName fragmentName) { + if (fragmentName.isAugment) { + // Coverage-ignore-block(suite): Not run. + if (fragmentName.kind == fragment.kind) { + // Example: + // + // class A { + // A(); + // augment A(); + // } + // + augmentations.add(fragmentName); + return true; + } else { + // Example: + // + // class A { + // A(); + // augment void A() {} + // } + // + // TODO(johnniwinther): Report augmentation conflict. + return false; + } + } else { + // Example: + // + // class A { + // A(); + // A(); + // } + // problemReporting.addProblem( templateDuplicatedDeclaration.withArguments(fragmentName.name), fragmentName.nameOffset, @@ -91,94 +792,295 @@ void _computeBuildersFromFragments(String name, List fragments, fragmentName.fileUri, context: [ templateDuplicatedDeclarationCause - .withArguments(existingSetable!.name) - .withLocation(existingSetable!.fileUri, - existingSetable!.nameOffset, existingSetable!.nameLength) + .withArguments(fragment.name) + .withLocation( + fragment.fileUri, fragment.nameOffset, fragment.nameLength) ]); - }*/ - existingGetable = fragmentName; + return false; + } } - void checkProperty({_FragmentName? getable, _FragmentName? setable}) { - if (getable != null && existingGetable != null) { - if (getable.isAugment) { - // Check that an introductory fragment exists and collect augmentations. - getable = null; + @override + void checkFragment( + ProblemReporting problemReporting, _FragmentName nonConstructorFragment) { + // Check conflict with non-constructor. + if (nonConstructorFragment.isStatic) { + // Coverage-ignore-block(suite): Not run. + if (fragment.kind == _FragmentKind.Constructor) { + // Example: + // + // class A { + // A.foo(); + // static void foo() {} + // } + // + problemReporting.addProblem( + templateMemberConflictsWithConstructor.withArguments(fragment.name), + nonConstructorFragment.nameOffset, + nonConstructorFragment.nameLength, + nonConstructorFragment.fileUri, + context: [ + templateMemberConflictsWithConstructorCause + .withArguments(fragment.name) + .withLocation(fragment.fileUri, fragment.nameOffset, + fragment.nameLength) + ]); } else { + assert(fragment.kind == _FragmentKind.Factory, + "Unexpected constructor kind $fragment"); + // Example: + // + // class A { + // factory A.foo() => throw ''; + // static void foo() {} + // } + // problemReporting.addProblem( - templateDuplicatedDeclaration.withArguments(getable.name), - getable.nameOffset, - getable.nameLength, - getable.fileUri, - context: [ - templateDuplicatedDeclarationCause - .withArguments(existingGetable!.name) - .withLocation(existingGetable!.fileUri, - existingGetable!.nameOffset, existingGetable!.nameLength) + templateMemberConflictsWithFactory.withArguments(fragment.name), + nonConstructorFragment.nameOffset, + nonConstructorFragment.nameLength, + nonConstructorFragment.fileUri, + context: [ + templateMemberConflictsWithFactoryCause + .withArguments(fragment.name) + .withLocation(fragment.fileUri, fragment.nameOffset, + fragment.nameLength) ]); } - } else if (setable != null && existingSetable != null) { - if (setable.isAugment) { - // TODO(johnniwinther): Check that an introductory fragment exists and - // collect augmentations. - setable = null; + } + } + + @override + void createBuilders( + void Function(Fragment, {bool conflictingSetter}) createBuilder) { + createBuilder(fragment.fragment); + for (_FragmentName fragmentName in augmentations) { + // Coverage-ignore-block(suite): Not run. + createBuilder(fragmentName.fragment); + } + } +} + +/// [_PreBuilder] for non-constructor, non-property declarations. +class _DeclarationPreBuilder extends _PreBuilder { + final _FragmentName fragment; + final List<_FragmentName> augmentations = []; + + // TODO(johnniwinther): Report error if [fragment] is augmenting. + _DeclarationPreBuilder(this.fragment); + + @override + bool absorbFragment( + ProblemReporting problemReporting, _FragmentName fragmentName) { + if (fragmentName.isAugment) { + if (fragmentName.kind == fragment.kind) { + // Example: + // + // class Foo {} + // augment class Foo {} + // + augmentations.add(fragmentName); + return true; } else { + // Example: + // + // class Foo {} + // augment extension Foo {} + // + // TODO(johnniwinther): Report augmentation conflict. + return false; + } + } else { + if (fragmentName.propertyKind == _PropertyKind.Setter) { + // Example: + // + // class Foo {} + // set Foo(_) {} + // problemReporting.addProblem( - templateDuplicatedDeclaration.withArguments(setable.name), - setable.nameOffset, - setable.nameLength, - setable.fileUri, + templateSetterConflictsWithDeclaration.withArguments(fragment.name), + fragmentName.nameOffset, + fragmentName.nameLength, + fragmentName.fileUri, + context: [ + templateSetterConflictsWithDeclarationCause + .withArguments(fragment.name) + .withLocation(fragment.fileUri, fragment.nameOffset, + fragment.nameLength) + ]); + } else { + // Example: + // + // class Foo {} + // class Foo {} + // + problemReporting.addProblem( + templateDuplicatedDeclaration.withArguments(fragmentName.name), + fragmentName.nameOffset, + fragmentName.nameLength, + fragmentName.fileUri, context: [ templateDuplicatedDeclarationCause - .withArguments(existingSetable!.name) - .withLocation(existingSetable!.fileUri, - existingSetable!.nameOffset, existingSetable!.nameLength) + .withArguments(fragment.name) + .withLocation(fragment.fileUri, fragment.nameOffset, + fragment.nameLength) ]); } + return false; } - if (getable != null) { - existingGetable = getable; + } + + @override + void checkFragment( + ProblemReporting problemReporting, _FragmentName constructorFragment) { + // Check conflict with constructor. + if (fragment.isStatic) { + if (constructorFragment.kind == _FragmentKind.Constructor) { + // Example: + // + // class A { + // static void foo() {} + // A.foo(); + // } + // + problemReporting.addProblem( + templateConstructorConflictsWithMember.withArguments(fragment.name), + constructorFragment.nameOffset, + constructorFragment.nameLength, + constructorFragment.fileUri, + context: [ + templateConstructorConflictsWithMemberCause + .withArguments(fragment.name) + .withLocation(fragment.fileUri, fragment.nameOffset, + fragment.nameLength) + ]); + } else { + assert(constructorFragment.kind == _FragmentKind.Factory, + "Unexpected constructor kind $constructorFragment"); + // Example: + // + // class A { + // static void foo() {} + // factory A.foo() => throw ''; + // } + // + problemReporting.addProblem( + templateFactoryConflictsWithMember.withArguments(fragment.name), + constructorFragment.nameOffset, + constructorFragment.nameLength, + constructorFragment.fileUri, + context: [ + templateFactoryConflictsWithMemberCause + .withArguments(fragment.name) + .withLocation(fragment.fileUri, fragment.nameOffset, + fragment.nameLength) + ]); + } } - if (setable != null) { - existingSetable = setable; + } + + @override + void createBuilders( + void Function(Fragment, {bool conflictingSetter}) createBuilder) { + createBuilder(fragment.fragment); + for (_FragmentName fragmentName in augmentations) { + createBuilder(fragmentName.fragment); } } +} + +_PreBuilder _createPreBuilder(_FragmentName fragmentName) { + switch (fragmentName.fragment) { + case ClassFragment(): + case EnumFragment(): + case ExtensionFragment(): + case ExtensionTypeFragment(): + case MethodFragment(): + case MixinFragment(): + case NamedMixinApplicationFragment(): + case TypedefFragment(): + return new _DeclarationPreBuilder(fragmentName); + case ConstructorFragment(): + case FactoryFragment(): + case PrimaryConstructorFragment(): + return new _ConstructorPreBuilder(fragmentName); + case FieldFragment(): + return new _PropertyPreBuilder.forField(fragmentName); + case GetterFragment(): + return new _PropertyPreBuilder.forGetter(fragmentName); + case SetterFragment(): + return new _PropertyPreBuilder.forSetter(fragmentName); + } +} - void checkConstructor(_FragmentName constructor) { - if (constructor.isAugment) { - // TODO(johnniwinther): Check that an introductory fragment exists and - // collect augmentations. - return; +void _computeBuildersFromFragments(String name, List fragments, + {required ProblemReporting problemReporting, + required SourceLoader loader, + required SourceLibraryBuilder enclosingLibraryBuilder, + DeclarationBuilder? declarationBuilder, + required List unboundNominalVariables, + required Map mixinApplications, + required List<_AddBuilder> builders, + required IndexedLibrary? indexedLibrary, + required ContainerType containerType, + IndexedContainer? indexedContainer, + ContainerName? containerName}) { + List<_PreBuilder> nonConstructorPreBuilders = []; + List<_PreBuilder> constructorPreBuilders = []; + List unnamedFragments = []; + + void addPreBuilder(_FragmentName fragmentName, + List<_PreBuilder> thesePreBuilders, List<_PreBuilder> otherPreBuilders) { + for (_PreBuilder existingPreBuilder in thesePreBuilders) { + if (existingPreBuilder.absorbFragment(problemReporting, fragmentName)) { + return; + } } - if (existingConstructor != null) { - problemReporting.addProblem( - templateDuplicatedDeclaration.withArguments(constructor.name), - constructor.nameOffset, - constructor.nameLength, - constructor.fileUri, - context: [ - templateDuplicatedDeclarationCause - .withArguments(existingConstructor!.name) - .withLocation( - existingConstructor!.fileUri, - existingConstructor!.nameOffset, - existingConstructor!.nameLength) - ]); + thesePreBuilders.add(_createPreBuilder(fragmentName)); + if (otherPreBuilders.isNotEmpty) { + otherPreBuilders.first.checkFragment(problemReporting, fragmentName); + } + } + + void addNonConstructorPreBuilder(_FragmentName fragmentName) { + addPreBuilder( + fragmentName, nonConstructorPreBuilders, constructorPreBuilders); + } + + void addConstructorPreBuilder(_FragmentName fragmentName) { + addPreBuilder( + fragmentName, constructorPreBuilders, nonConstructorPreBuilders); + } + + void addFragment(_FragmentName fragmentName) { + switch (fragmentName.kind) { + case _FragmentKind.Constructor: + case _FragmentKind.Factory: + addConstructorPreBuilder(fragmentName); + case _FragmentKind.Class: + case _FragmentKind.Mixin: + case _FragmentKind.NamedMixinApplication: + case _FragmentKind.Enum: + case _FragmentKind.Extension: + case _FragmentKind.ExtensionType: + case _FragmentKind.Typedef: + case _FragmentKind.Method: + case _FragmentKind.Property: + addNonConstructorPreBuilder(fragmentName); } - existingConstructor = constructor; } for (Fragment fragment in fragments) { switch (fragment) { case ClassFragment(): - checkGetable(new _FragmentName( + addFragment(new _FragmentName(_FragmentKind.Class, fragment, fileUri: fragment.fileUri, name: fragment.name, nameOffset: fragment.nameOffset, nameLength: fragment.name.length, isAugment: fragment.modifiers.isAugment)); case EnumFragment(): - checkGetable(new _FragmentName( + addFragment(new _FragmentName(_FragmentKind.Enum, fragment, fileUri: fragment.fileUri, name: fragment.name, nameOffset: fragment.nameOffset, @@ -186,35 +1088,38 @@ void _computeBuildersFromFragments(String name, List fragments, // TODO(johnniwinther): Support enum augmentations. isAugment: false)); case ExtensionTypeFragment(): - checkGetable(new _FragmentName( + addFragment(new _FragmentName(_FragmentKind.ExtensionType, fragment, fileUri: fragment.fileUri, name: fragment.name, nameOffset: fragment.nameOffset, nameLength: fragment.name.length, isAugment: fragment.modifiers.isAugment)); case MethodFragment(): - checkGetable(new _FragmentName( + addFragment(new _FragmentName(_FragmentKind.Method, fragment, fileUri: fragment.fileUri, name: fragment.name, nameOffset: fragment.nameOffset, nameLength: fragment.name.length, - isAugment: fragment.modifiers.isAugment)); + isAugment: fragment.modifiers.isAugment, + isStatic: + declarationBuilder == null || fragment.modifiers.isStatic)); case MixinFragment(): - checkGetable(new _FragmentName( + addFragment(new _FragmentName(_FragmentKind.Mixin, fragment, fileUri: fragment.fileUri, name: fragment.name, nameOffset: fragment.nameOffset, nameLength: fragment.name.length, isAugment: fragment.modifiers.isAugment)); case NamedMixinApplicationFragment(): - checkGetable(new _FragmentName( + addFragment(new _FragmentName( + _FragmentKind.NamedMixinApplication, fragment, fileUri: fragment.fileUri, name: fragment.name, nameOffset: fragment.nameOffset, nameLength: fragment.name.length, isAugment: fragment.modifiers.isAugment)); case TypedefFragment(): - checkGetable(new _FragmentName( + addFragment(new _FragmentName(_FragmentKind.Typedef, fragment, fileUri: fragment.fileUri, name: fragment.name, nameOffset: fragment.nameOffset, @@ -223,30 +1128,31 @@ void _computeBuildersFromFragments(String name, List fragments, isAugment: false)); case ExtensionFragment(): if (!fragment.isUnnamed) { - checkGetable(new _FragmentName( + addFragment(new _FragmentName(_FragmentKind.Extension, fragment, fileUri: fragment.fileUri, name: fragment.name, nameOffset: fragment.fileOffset, nameLength: fragment.name.length, isAugment: fragment.modifiers.isAugment)); + } else { + unnamedFragments.add(fragment); } - // TODO(johnniwinther): case FactoryFragment(): - checkConstructor(new _FragmentName( + addFragment(new _FragmentName(_FragmentKind.Factory, fragment, fileUri: fragment.fileUri, name: fragment.constructorName.fullName, nameOffset: fragment.constructorName.fullNameOffset, nameLength: fragment.constructorName.fullNameLength, isAugment: fragment.modifiers.isAugment)); case ConstructorFragment(): - checkConstructor(new _FragmentName( + addFragment(new _FragmentName(_FragmentKind.Constructor, fragment, fileUri: fragment.fileUri, name: fragment.constructorName.fullName, nameOffset: fragment.constructorName.fullNameOffset, nameLength: fragment.constructorName.fullNameLength, isAugment: fragment.modifiers.isAugment)); case PrimaryConstructorFragment(): - checkConstructor(new _FragmentName( + addFragment(new _FragmentName(_FragmentKind.Constructor, fragment, fileUri: fragment.fileUri, name: fragment.constructorName.fullName, nameOffset: fragment.constructorName.fullNameOffset, @@ -254,35 +1160,46 @@ void _computeBuildersFromFragments(String name, List fragments, isAugment: fragment.modifiers.isAugment)); case FieldFragment(): _FragmentName fragmentName = new _FragmentName( + _FragmentKind.Property, fragment, fileUri: fragment.fileUri, name: fragment.name, nameOffset: fragment.nameOffset, nameLength: fragment.name.length, - isAugment: fragment.modifiers.isAugment); - checkProperty(getable: fragmentName - // TODO(johnniwinther): Check getter/setter conflict here. - /*, setable: fragment.hasSetter ? fragmentName : null*/ - ); + isAugment: fragment.modifiers.isAugment, + propertyKind: fragment.hasSetter + ? _PropertyKind.Field + : _PropertyKind.FinalField, + isStatic: + declarationBuilder == null || fragment.modifiers.isStatic); + addFragment(fragmentName); case GetterFragment(): _FragmentName fragmentName = new _FragmentName( + _FragmentKind.Property, fragment, fileUri: fragment.fileUri, name: fragment.name, nameOffset: fragment.nameOffset, nameLength: fragment.name.length, - isAugment: fragment.modifiers.isAugment); - checkProperty(getable: fragmentName); + isAugment: fragment.modifiers.isAugment, + propertyKind: _PropertyKind.Getter, + isStatic: + declarationBuilder == null || fragment.modifiers.isStatic); + addFragment(fragmentName); case SetterFragment(): _FragmentName fragmentName = new _FragmentName( + _FragmentKind.Property, fragment, fileUri: fragment.fileUri, name: fragment.name, nameOffset: fragment.nameOffset, nameLength: fragment.name.length, - isAugment: fragment.modifiers.isAugment); - checkProperty(setable: fragmentName); + isAugment: fragment.modifiers.isAugment, + propertyKind: _PropertyKind.Setter, + isStatic: + declarationBuilder == null || fragment.modifiers.isStatic); + addFragment(fragmentName); } } - for (Fragment fragment in fragments) { + void createBuilder(Fragment fragment, {bool conflictingSetter = false}) { switch (fragment) { case TypedefFragment(): Reference? reference = indexedLibrary?.lookupTypedef(fragment.name); @@ -585,11 +1502,11 @@ void _computeBuildersFromFragments(String name, List fragments, /// treated as an external getter/setter pair and is therefore /// encoded as a pair of top level methods using the extension /// instance member naming convention. - fieldGetterReference = indexedContainer.lookupGetterReference( + fieldGetterReference = indexedContainer!.lookupGetterReference( nameScheme .getProcedureMemberName(ProcedureKind.Getter, name) .name); - fieldSetterReference = indexedContainer.lookupGetterReference( + fieldSetterReference = indexedContainer!.lookupGetterReference( nameScheme .getProcedureMemberName(ProcedureKind.Setter, name) .name); @@ -599,18 +1516,18 @@ void _computeBuildersFromFragments(String name, List fragments, isSynthesized: true) .name; fieldGetterReference = - indexedContainer.lookupGetterReference(nameToLookup); + indexedContainer!.lookupGetterReference(nameToLookup); } else { Name nameToLookup = nameScheme .getFieldMemberName(FieldNameType.Field, name, isSynthesized: fieldIsLateWithLowering) .name; fieldReference = - indexedContainer.lookupFieldReference(nameToLookup); + indexedContainer!.lookupFieldReference(nameToLookup); fieldGetterReference = - indexedContainer.lookupGetterReference(nameToLookup); + indexedContainer!.lookupGetterReference(nameToLookup); fieldSetterReference = - indexedContainer.lookupSetterReference(nameToLookup); + indexedContainer!.lookupSetterReference(nameToLookup); } if (fieldIsLateWithLowering) { @@ -619,17 +1536,17 @@ void _computeBuildersFromFragments(String name, List fragments, isSynthesized: fieldIsLateWithLowering) .name; lateIsSetFieldReference = - indexedContainer.lookupFieldReference(lateIsSetName); + indexedContainer!.lookupFieldReference(lateIsSetName); lateIsSetGetterReference = - indexedContainer.lookupGetterReference(lateIsSetName); + indexedContainer!.lookupGetterReference(lateIsSetName); lateIsSetSetterReference = - indexedContainer.lookupSetterReference(lateIsSetName); - lateGetterReference = indexedContainer.lookupGetterReference( + indexedContainer!.lookupSetterReference(lateIsSetName); + lateGetterReference = indexedContainer!.lookupGetterReference( nameScheme .getFieldMemberName(FieldNameType.Getter, name, isSynthesized: fieldIsLateWithLowering) .name); - lateSetterReference = indexedContainer.lookupSetterReference( + lateSetterReference = indexedContainer!.lookupSetterReference( nameScheme .getFieldMemberName(FieldNameType.Setter, name, isSynthesized: fieldIsLateWithLowering) @@ -694,7 +1611,7 @@ void _computeBuildersFromFragments(String name, List fragments, Name nameToLookup = nameScheme.getProcedureMemberName(kind, name).name; procedureReference = - indexedContainer.lookupGetterReference(nameToLookup); + indexedContainer!.lookupGetterReference(nameToLookup); } SourceProcedureBuilder procedureBuilder = new SourceProcedureBuilder( @@ -756,10 +1673,10 @@ void _computeBuildersFromFragments(String name, List fragments, isInstanceMember) { // Extension (type) instance setters are encoded as methods. procedureReference = - indexedContainer.lookupGetterReference(nameToLookup); + indexedContainer!.lookupGetterReference(nameToLookup); } else { procedureReference = - indexedContainer.lookupSetterReference(nameToLookup); + indexedContainer!.lookupSetterReference(nameToLookup); } } @@ -790,6 +1707,9 @@ void _computeBuildersFromFragments(String name, List fragments, loader.buildersCreatedWithReferences[procedureReference] = procedureBuilder; } + if (conflictingSetter) { + procedureBuilder.isConflictingSetter = true; + } case MethodFragment(): String name = fragment.name; ProcedureKind kind = fragment.kind; @@ -819,12 +1739,13 @@ void _computeBuildersFromFragments(String name, List fragments, Name nameToLookup = nameScheme.getProcedureMemberName(kind, name).name; procedureReference = - indexedContainer.lookupGetterReference(nameToLookup); + indexedContainer!.lookupGetterReference(nameToLookup); if ((isExtensionMember || isExtensionTypeMember) && kind == ProcedureKind.Method) { - tearOffReference = indexedContainer.lookupGetterReference(nameScheme - .getProcedureMemberName(ProcedureKind.Getter, name) - .name); + tearOffReference = indexedContainer!.lookupGetterReference( + nameScheme + .getProcedureMemberName(ProcedureKind.Getter, name) + .name); } } @@ -870,9 +1791,9 @@ void _computeBuildersFromFragments(String name, List fragments, Reference? tearOffReference; if (indexedContainer != null) { - constructorReference = indexedContainer.lookupConstructorReference( + constructorReference = indexedContainer!.lookupConstructorReference( nameScheme.getConstructorMemberName(name, isTearOff: false).name); - tearOffReference = indexedContainer.lookupGetterReference( + tearOffReference = indexedContainer!.lookupGetterReference( nameScheme.getConstructorMemberName(name, isTearOff: true).name); } @@ -945,9 +1866,9 @@ void _computeBuildersFromFragments(String name, List fragments, Reference? tearOffReference; if (indexedContainer != null) { - constructorReference = indexedContainer.lookupConstructorReference( + constructorReference = indexedContainer!.lookupConstructorReference( nameScheme.getConstructorMemberName(name, isTearOff: false).name); - tearOffReference = indexedContainer.lookupGetterReference( + tearOffReference = indexedContainer!.lookupGetterReference( nameScheme.getConstructorMemberName(name, isTearOff: true).name); } @@ -1020,9 +1941,9 @@ void _computeBuildersFromFragments(String name, List fragments, Reference? procedureReference; Reference? tearOffReference; if (indexedContainer != null) { - procedureReference = indexedContainer.lookupConstructorReference( + procedureReference = indexedContainer!.lookupConstructorReference( nameScheme.getConstructorMemberName(name, isTearOff: false).name); - tearOffReference = indexedContainer.lookupGetterReference( + tearOffReference = indexedContainer!.lookupGetterReference( nameScheme.getConstructorMemberName(name, isTearOff: true).name); } // Coverage-ignore(suite): Not run. @@ -1088,6 +2009,16 @@ void _computeBuildersFromFragments(String name, List fragments, } } } + + for (_PreBuilder preBuilder in nonConstructorPreBuilders) { + preBuilder.createBuilders(createBuilder); + } + for (_PreBuilder preBuilder in constructorPreBuilders) { + preBuilder.createBuilders(createBuilder); + } + for (Fragment fragment in unnamedFragments) { + createBuilder(fragment); + } } class LibraryNameSpaceBuilder { diff --git a/pkg/front_end/messages.status b/pkg/front_end/messages.status index 2e3f4ba052b3..4d32852ece9f 100644 --- a/pkg/front_end/messages.status +++ b/pkg/front_end/messages.status @@ -81,13 +81,6 @@ CompilingWithSoundNullSafety/analyzerCode: Fail CompilingWithoutSoundNullSafety/analyzerCode: Fail ConflictingModifiers/part_wrapped_script1: Fail ConflictingModifiers/script1: Fail -ConflictsWithConstructor/example: Fail -ConflictsWithFactory/analyzerCode: Fail -ConflictsWithFactory/example: Fail -ConflictsWithImplicitSetter/example: Fail -ConflictsWithMember/example: Fail -ConflictsWithMemberWarning/example: Fail -ConflictsWithSetter/example: Fail ConflictsWithTypeParameter/example: Fail ConstructorShouldBeListedAsCallableInDynamicInterface/analyzerCode: Fail ConstructorShouldBeListedAsCallableInDynamicInterface/example: Fail diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml index fa5ff5d8adda..f592f4a3fe27 100644 --- a/pkg/front_end/messages.yaml +++ b/pkg/front_end/messages.yaml @@ -2818,24 +2818,129 @@ ExtensionTypeDeclaresInstanceField: int? field; } -ConflictsWithConstructor: - problemMessage: "Conflicts with constructor '#name'." - analyzerCode: CONFLICTS_WITH_CONSTRUCTOR +StaticConflictsWithInstance: + problemMessage: "Static property '#name' conflicts with instance property of the same name." + analyzerCode: CONFLICTS_WITH_MEMBER + exampleAllowMoreCodes: true # TODO(johnniwinther): Avoid this + script: | + class A { + void set foo(_) {} + static int get foo => 42; + } + +StaticConflictsWithInstanceCause: + problemMessage: "Conflicting instance property '#name'." + severity: CONTEXT + +InstanceConflictsWithStatic: + problemMessage: "Instance property '#name' conflicts with static property of the same name." + analyzerCode: CONFLICTS_WITH_MEMBER + exampleAllowMoreCodes: true # TODO(johnniwinther): Avoid this + script: | + class A { + static void set foo(_) {} + int get foo => 42; + } + +InstanceConflictsWithStaticCause: + problemMessage: "Conflicting static property '#name'." + severity: CONTEXT + +SetterConflictsWithDeclaration: + problemMessage: "The setter conflicts with declaration '#name'." + analyzerCode: CONFLICTS_WITH_MEMBER + script: | + class Foo {} + set Foo(_) {} + +SetterConflictsWithDeclarationCause: + problemMessage: "Conflicting declaration '#name'." + severity: CONTEXT + +ConstructorConflictsWithMember: + problemMessage: "The constructor conflicts with member '#name'." + analyzerCode: CONFLICTS_WITH_MEMBER + script: | + class A { + static int get foo => 42; + A.foo(); + } + +ConstructorConflictsWithMemberCause: + problemMessage: "Conflicting member '#name'." + severity: CONTEXT + +FactoryConflictsWithMember: + problemMessage: "The factory conflicts with member '#name'." + analyzerCode: CONFLICTS_WITH_MEMBER + script: | + class A { + static int get foo => 42; + factory A.foo() => throw ''; + } + +FactoryConflictsWithMemberCause: + problemMessage: "Conflicting member '#name'." + severity: CONTEXT + +MemberConflictsWithConstructor: + problemMessage: "The member conflicts with constructor '#name'." + analyzerCode: CONFLICTS_WITH_MEMBER + script: | + class A { + A.foo(); + static void foo() {} + } -ConflictsWithFactory: - problemMessage: "Conflicts with factory '#name'." +MemberConflictsWithConstructorCause: + problemMessage: "Conflicting constructor '#name'." + severity: CONTEXT -ConflictsWithMember: - problemMessage: "Conflicts with member '#name'." +MemberConflictsWithFactory: + problemMessage: "The member conflicts with factory '#name'." analyzerCode: CONFLICTS_WITH_MEMBER + script: | + class A { + factory A.foo() => throw ''; + static void foo() {} + } + +MemberConflictsWithFactoryCause: + problemMessage: "Conflicting factory '#name'." + severity: CONTEXT + +DeclarationConflictsWithSetter: + problemMessage: "The declaration conflicts with setter '#name'." + analyzerCode: CONFLICTS_WITH_MEMBER + script: | + void set foo(_) {} + void foo() {} + +DeclarationConflictsWithSetterCause: + problemMessage: "Conflicting setter '#name'." + severity: CONTEXT ConflictsWithImplicitSetter: problemMessage: "Conflicts with the implicit setter of the field '#name'." analyzerCode: CONFLICTS_WITH_MEMBER + script: | + int? foo; + void set foo(_) {} + +ConflictsWithImplicitSetterCause: + problemMessage: "Field '#name' with the implicit setter." + severity: CONTEXT ConflictsWithSetter: problemMessage: "Conflicts with setter '#name'." analyzerCode: CONFLICTS_WITH_MEMBER + script: | + void set foo(_) {} + int? foo; + +ConflictsWithSetterCause: + problemMessage: "Conflicting setter '#name'." + severity: CONTEXT ConflictsWithTypeParameter: problemMessage: "Conflicts with type variable '#name'." @@ -4909,6 +5014,7 @@ ObjectMixesIn: StaticAndInstanceConflict: problemMessage: "This static member conflicts with an instance member." + exampleAllowMoreCodes: true # TODO(johnniwinther): Avoid this script: - | class C { diff --git a/pkg/front_end/test/coverage_suite_expected.dart b/pkg/front_end/test/coverage_suite_expected.dart index d4217b777d6c..e7628d00bbdd 100644 --- a/pkg/front_end/test/coverage_suite_expected.dart +++ b/pkg/front_end/test/coverage_suite_expected.dart @@ -225,7 +225,7 @@ const Map _expect = { ), // 100.0%. "package:front_end/src/base/uri_translator.dart": ( - hitCount: 42, + hitCount: 49, missCount: 0, ), // 100.0%. @@ -505,7 +505,7 @@ const Map _expect = { ), // 100.0%. "package:front_end/src/fragment/field.dart": ( - hitCount: 13, + hitCount: 22, missCount: 0, ), // 100.0%. @@ -670,7 +670,7 @@ const Map _expect = { ), // 100.0%. "package:front_end/src/kernel/hierarchy/members_node.dart": ( - hitCount: 1167, + hitCount: 1142, missCount: 0, ), // 100.0%. @@ -870,7 +870,7 @@ const Map _expect = { ), // 100.0%. "package:front_end/src/source/outline_builder.dart": ( - hitCount: 2126, + hitCount: 2133, missCount: 0, ), // 100.0%. @@ -885,12 +885,12 @@ const Map _expect = { ), // 100.0%. "package:front_end/src/source/source_builder_mixins.dart": ( - hitCount: 172, + hitCount: 137, missCount: 0, ), // 100.0%. "package:front_end/src/source/source_class_builder.dart": ( - hitCount: 1279, + hitCount: 1275, missCount: 0, ), // 100.0%. @@ -916,7 +916,7 @@ const Map _expect = { // 100.0%. "package:front_end/src/source/source_extension_type_declaration_builder.dart": ( - hitCount: 509, + hitCount: 508, missCount: 0, ), // 100.0%. @@ -936,7 +936,7 @@ const Map _expect = { ), // 100.0%. "package:front_end/src/source/source_library_builder.dart": ( - hitCount: 1347, + hitCount: 1309, missCount: 0, ), // 100.0%. @@ -966,7 +966,7 @@ const Map _expect = { ), // 100.0%. "package:front_end/src/source/type_parameter_scope_builder.dart": ( - hitCount: 991, + hitCount: 1471, missCount: 0, ), // 100.0%. diff --git a/pkg/front_end/test/spell_checking_list_code.txt b/pkg/front_end/test/spell_checking_list_code.txt index b9917632ad1e..284f67153a5b 100644 --- a/pkg/front_end/test/spell_checking_list_code.txt +++ b/pkg/front_end/test/spell_checking_list_code.txt @@ -16,6 +16,8 @@ abbreviate abc abcdef abs +absorb +absorbed accepting accompany accounting @@ -1188,6 +1190,7 @@ obstruct obtaining occasionally occupied +occupy offending ogham okay @@ -1313,6 +1316,7 @@ precompiled precompiles precompiling precomputed +precursor preexisted preexisting preferably diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart.strong.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart.strong.expect index ae271e675457..58ed67baa241 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart.strong.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart.strong.expect @@ -12,8 +12,8 @@ library; // pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:15:9: Error: 'AAlias' is already declared in this scope. // typedef AAlias = C; // error // ^^^^^^ -// pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:14:9: Context: Previous declaration of 'AAlias'. -// typedef AAlias = A; // error +// pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:11:9: Context: Previous declaration of 'AAlias'. +// typedef AAlias = A; // ^^^^^^ // // pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:16:9: Error: 'CAlias' is already declared in this scope. @@ -26,15 +26,15 @@ library; // pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:17:9: Error: 'CAlias' is already declared in this scope. // typedef CAlias = C; // error // ^^^^^^ -// pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:16:9: Context: Previous declaration of 'CAlias'. -// typedef CAlias = C; // error +// pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:12:9: Context: Previous declaration of 'CAlias'. +// typedef CAlias = C; // ^^^^^^ // // pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:18:9: Error: 'CAlias' is already declared in this scope. // typedef CAlias = C; // error // ^^^^^^ -// pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:17:9: Context: Previous declaration of 'CAlias'. -// typedef CAlias = C; // error +// pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:12:9: Context: Previous declaration of 'CAlias'. +// typedef CAlias = C; // ^^^^^^ // import self as self; diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart.strong.modular.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart.strong.modular.expect index ae271e675457..58ed67baa241 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart.strong.modular.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart.strong.modular.expect @@ -12,8 +12,8 @@ library; // pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:15:9: Error: 'AAlias' is already declared in this scope. // typedef AAlias = C; // error // ^^^^^^ -// pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:14:9: Context: Previous declaration of 'AAlias'. -// typedef AAlias = A; // error +// pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:11:9: Context: Previous declaration of 'AAlias'. +// typedef AAlias = A; // ^^^^^^ // // pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:16:9: Error: 'CAlias' is already declared in this scope. @@ -26,15 +26,15 @@ library; // pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:17:9: Error: 'CAlias' is already declared in this scope. // typedef CAlias = C; // error // ^^^^^^ -// pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:16:9: Context: Previous declaration of 'CAlias'. -// typedef CAlias = C; // error +// pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:12:9: Context: Previous declaration of 'CAlias'. +// typedef CAlias = C; // ^^^^^^ // // pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:18:9: Error: 'CAlias' is already declared in this scope. // typedef CAlias = C; // error // ^^^^^^ -// pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:17:9: Context: Previous declaration of 'CAlias'. -// typedef CAlias = C; // error +// pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:12:9: Context: Previous declaration of 'CAlias'. +// typedef CAlias = C; // ^^^^^^ // import self as self; diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart.strong.outline.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart.strong.outline.expect index 6f0851afdf89..f443ef1131e7 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart.strong.outline.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart.strong.outline.expect @@ -12,8 +12,8 @@ library; // pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:15:9: Error: 'AAlias' is already declared in this scope. // typedef AAlias = C; // error // ^^^^^^ -// pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:14:9: Context: Previous declaration of 'AAlias'. -// typedef AAlias = A; // error +// pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:11:9: Context: Previous declaration of 'AAlias'. +// typedef AAlias = A; // ^^^^^^ // // pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:16:9: Error: 'CAlias' is already declared in this scope. @@ -26,15 +26,15 @@ library; // pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:17:9: Error: 'CAlias' is already declared in this scope. // typedef CAlias = C; // error // ^^^^^^ -// pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:16:9: Context: Previous declaration of 'CAlias'. -// typedef CAlias = C; // error +// pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:12:9: Context: Previous declaration of 'CAlias'. +// typedef CAlias = C; // ^^^^^^ // // pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:18:9: Error: 'CAlias' is already declared in this scope. // typedef CAlias = C; // error // ^^^^^^ -// pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:17:9: Context: Previous declaration of 'CAlias'. -// typedef CAlias = C; // error +// pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:12:9: Context: Previous declaration of 'CAlias'. +// typedef CAlias = C; // ^^^^^^ // import self as self; diff --git a/pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart.strong.transformed.expect b/pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart.strong.transformed.expect index ae271e675457..58ed67baa241 100644 --- a/pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart.strong.transformed.expect @@ -12,8 +12,8 @@ library; // pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:15:9: Error: 'AAlias' is already declared in this scope. // typedef AAlias = C; // error // ^^^^^^ -// pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:14:9: Context: Previous declaration of 'AAlias'. -// typedef AAlias = A; // error +// pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:11:9: Context: Previous declaration of 'AAlias'. +// typedef AAlias = A; // ^^^^^^ // // pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:16:9: Error: 'CAlias' is already declared in this scope. @@ -26,15 +26,15 @@ library; // pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:17:9: Error: 'CAlias' is already declared in this scope. // typedef CAlias = C; // error // ^^^^^^ -// pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:16:9: Context: Previous declaration of 'CAlias'. -// typedef CAlias = C; // error +// pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:12:9: Context: Previous declaration of 'CAlias'. +// typedef CAlias = C; // ^^^^^^ // // pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:18:9: Error: 'CAlias' is already declared in this scope. // typedef CAlias = C; // error // ^^^^^^ -// pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:17:9: Context: Previous declaration of 'CAlias'. -// typedef CAlias = C; // error +// pkg/front_end/testcases/constructor_tearoffs/lowering/duplicate_typedefs.dart:12:9: Context: Previous declaration of 'CAlias'. +// typedef CAlias = C; // ^^^^^^ // import self as self; diff --git a/pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart.strong.expect b/pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart.strong.expect index 75a123eca32a..9539aa07e1ae 100644 --- a/pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart.strong.expect +++ b/pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart.strong.expect @@ -2,67 +2,59 @@ library; // // Problems in library: // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:8:3: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:8:3: Error: The constructor conflicts with member 'n'. // Class1.n(this.id); /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:7:18: Error: Conflicts with constructor 'Class1.n'. +// ^^^^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:7:18: Context: Conflicting member 'n'. // static int get n => 1; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:14:9: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:14:9: Error: The constructor conflicts with member 'n'. // const Class2.n(this.id); /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:13:14: Error: Conflicts with constructor 'Class2.n'. +// ^^^^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:13:14: Context: Conflicting member 'n'. // static int n() => 2; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:21:11: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:21:11: Error: The factory conflicts with member 'n'. // factory Class3.n(int id) = Class3.new; /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:19:14: Error: Conflicts with factory 'Class3.n'. +// ^^^^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:19:14: Context: Conflicting member 'n'. // static int n() => 3; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:27:3: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:27:3: Error: The constructor conflicts with member 'n'. // Class4.n(this.id); /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:26:14: Error: Conflicts with constructor 'Class4.n'. +// ^^^^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:26:14: Context: Conflicting member 'n'. // static int n = 1; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:32:3: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:32:3: Error: The constructor conflicts with member 'n'. // ET1.n(this.id); /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:31:18: Error: Conflicts with constructor 'ET1.n'. +// ^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:31:18: Context: Conflicting member 'n'. // static int get n => 1; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:37:9: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:37:9: Error: The constructor conflicts with member 'n'. // const ET2.n(this.id); /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:36:14: Error: Conflicts with constructor 'ET2.n'. +// ^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:36:14: Context: Conflicting member 'n'. // static int n() => 2; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:42:11: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:42:11: Error: The factory conflicts with member 'n'. // factory ET3.n(int id) = ET3.new; /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:41:14: Error: Conflicts with factory 'ET3.n'. +// ^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:41:14: Context: Conflicting member 'n'. // static int n() => 3; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:47:3: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:47:3: Error: The constructor conflicts with member 'n'. // ET4.n(this.id); /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:46:14: Error: Conflicts with constructor 'ET4.n'. +// ^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:46:14: Context: Conflicting member 'n'. // static int n = 1; // ^ // diff --git a/pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart.strong.modular.expect b/pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart.strong.modular.expect index 75a123eca32a..9539aa07e1ae 100644 --- a/pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart.strong.modular.expect +++ b/pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart.strong.modular.expect @@ -2,67 +2,59 @@ library; // // Problems in library: // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:8:3: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:8:3: Error: The constructor conflicts with member 'n'. // Class1.n(this.id); /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:7:18: Error: Conflicts with constructor 'Class1.n'. +// ^^^^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:7:18: Context: Conflicting member 'n'. // static int get n => 1; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:14:9: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:14:9: Error: The constructor conflicts with member 'n'. // const Class2.n(this.id); /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:13:14: Error: Conflicts with constructor 'Class2.n'. +// ^^^^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:13:14: Context: Conflicting member 'n'. // static int n() => 2; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:21:11: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:21:11: Error: The factory conflicts with member 'n'. // factory Class3.n(int id) = Class3.new; /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:19:14: Error: Conflicts with factory 'Class3.n'. +// ^^^^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:19:14: Context: Conflicting member 'n'. // static int n() => 3; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:27:3: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:27:3: Error: The constructor conflicts with member 'n'. // Class4.n(this.id); /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:26:14: Error: Conflicts with constructor 'Class4.n'. +// ^^^^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:26:14: Context: Conflicting member 'n'. // static int n = 1; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:32:3: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:32:3: Error: The constructor conflicts with member 'n'. // ET1.n(this.id); /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:31:18: Error: Conflicts with constructor 'ET1.n'. +// ^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:31:18: Context: Conflicting member 'n'. // static int get n => 1; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:37:9: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:37:9: Error: The constructor conflicts with member 'n'. // const ET2.n(this.id); /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:36:14: Error: Conflicts with constructor 'ET2.n'. +// ^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:36:14: Context: Conflicting member 'n'. // static int n() => 2; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:42:11: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:42:11: Error: The factory conflicts with member 'n'. // factory ET3.n(int id) = ET3.new; /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:41:14: Error: Conflicts with factory 'ET3.n'. +// ^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:41:14: Context: Conflicting member 'n'. // static int n() => 3; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:47:3: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:47:3: Error: The constructor conflicts with member 'n'. // ET4.n(this.id); /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:46:14: Error: Conflicts with constructor 'ET4.n'. +// ^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:46:14: Context: Conflicting member 'n'. // static int n = 1; // ^ // diff --git a/pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart.strong.outline.expect b/pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart.strong.outline.expect index 6865a6c678d4..4a9bc864f6b2 100644 --- a/pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart.strong.outline.expect +++ b/pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart.strong.outline.expect @@ -2,67 +2,59 @@ library; // // Problems in library: // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:8:3: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:8:3: Error: The constructor conflicts with member 'n'. // Class1.n(this.id); /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:7:18: Error: Conflicts with constructor 'Class1.n'. +// ^^^^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:7:18: Context: Conflicting member 'n'. // static int get n => 1; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:14:9: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:14:9: Error: The constructor conflicts with member 'n'. // const Class2.n(this.id); /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:13:14: Error: Conflicts with constructor 'Class2.n'. +// ^^^^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:13:14: Context: Conflicting member 'n'. // static int n() => 2; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:21:11: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:21:11: Error: The factory conflicts with member 'n'. // factory Class3.n(int id) = Class3.new; /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:19:14: Error: Conflicts with factory 'Class3.n'. +// ^^^^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:19:14: Context: Conflicting member 'n'. // static int n() => 3; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:27:3: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:27:3: Error: The constructor conflicts with member 'n'. // Class4.n(this.id); /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:26:14: Error: Conflicts with constructor 'Class4.n'. +// ^^^^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:26:14: Context: Conflicting member 'n'. // static int n = 1; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:32:3: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:32:3: Error: The constructor conflicts with member 'n'. // ET1.n(this.id); /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:31:18: Error: Conflicts with constructor 'ET1.n'. +// ^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:31:18: Context: Conflicting member 'n'. // static int get n => 1; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:37:9: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:37:9: Error: The constructor conflicts with member 'n'. // const ET2.n(this.id); /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:36:14: Error: Conflicts with constructor 'ET2.n'. +// ^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:36:14: Context: Conflicting member 'n'. // static int n() => 2; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:42:11: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:42:11: Error: The factory conflicts with member 'n'. // factory ET3.n(int id) = ET3.new; /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:41:14: Error: Conflicts with factory 'ET3.n'. +// ^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:41:14: Context: Conflicting member 'n'. // static int n() => 3; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:47:3: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:47:3: Error: The constructor conflicts with member 'n'. // ET4.n(this.id); /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:46:14: Error: Conflicts with constructor 'ET4.n'. +// ^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:46:14: Context: Conflicting member 'n'. // static int n = 1; // ^ // diff --git a/pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart.strong.transformed.expect b/pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart.strong.transformed.expect index 75a123eca32a..9539aa07e1ae 100644 --- a/pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart.strong.transformed.expect @@ -2,67 +2,59 @@ library; // // Problems in library: // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:8:3: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:8:3: Error: The constructor conflicts with member 'n'. // Class1.n(this.id); /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:7:18: Error: Conflicts with constructor 'Class1.n'. +// ^^^^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:7:18: Context: Conflicting member 'n'. // static int get n => 1; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:14:9: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:14:9: Error: The constructor conflicts with member 'n'. // const Class2.n(this.id); /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:13:14: Error: Conflicts with constructor 'Class2.n'. +// ^^^^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:13:14: Context: Conflicting member 'n'. // static int n() => 2; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:21:11: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:21:11: Error: The factory conflicts with member 'n'. // factory Class3.n(int id) = Class3.new; /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:19:14: Error: Conflicts with factory 'Class3.n'. +// ^^^^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:19:14: Context: Conflicting member 'n'. // static int n() => 3; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:27:3: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:27:3: Error: The constructor conflicts with member 'n'. // Class4.n(this.id); /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:26:14: Error: Conflicts with constructor 'Class4.n'. +// ^^^^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:26:14: Context: Conflicting member 'n'. // static int n = 1; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:32:3: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:32:3: Error: The constructor conflicts with member 'n'. // ET1.n(this.id); /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:31:18: Error: Conflicts with constructor 'ET1.n'. +// ^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:31:18: Context: Conflicting member 'n'. // static int get n => 1; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:37:9: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:37:9: Error: The constructor conflicts with member 'n'. // const ET2.n(this.id); /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:36:14: Error: Conflicts with constructor 'ET2.n'. +// ^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:36:14: Context: Conflicting member 'n'. // static int n() => 2; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:42:11: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:42:11: Error: The factory conflicts with member 'n'. // factory ET3.n(int id) = ET3.new; /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:41:14: Error: Conflicts with factory 'ET3.n'. +// ^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:41:14: Context: Conflicting member 'n'. // static int n() => 3; // ^ // -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:47:3: Error: Conflicts with member 'n'. +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:47:3: Error: The constructor conflicts with member 'n'. // ET4.n(this.id); /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:46:14: Error: Conflicts with constructor 'ET4.n'. +// ^^^^^ +// pkg/front_end/testcases/extension_types/constructor_vs_static_member.dart:46:14: Context: Conflicting member 'n'. // static int n = 1; // ^ // diff --git a/pkg/front_end/testcases/extension_types/implements_conflicts.dart.strong.expect b/pkg/front_end/testcases/extension_types/implements_conflicts.dart.strong.expect index df52d276c25a..6a2a9495a4ea 100644 --- a/pkg/front_end/testcases/extension_types/implements_conflicts.dart.strong.expect +++ b/pkg/front_end/testcases/extension_types/implements_conflicts.dart.strong.expect @@ -2,13 +2,12 @@ library; // // Problems in library: // -// pkg/front_end/testcases/extension_types/implements_conflicts.dart:67:12: Error: Conflicts with member 'method4'. +// pkg/front_end/testcases/extension_types/implements_conflicts.dart:67:12: Error: The setter conflicts with declaration 'method4'. // void set method4(int value) {} /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/implements_conflicts.dart:66:8: Error: Conflicts with setter 'method4'. +// ^^^^^^^ +// pkg/front_end/testcases/extension_types/implements_conflicts.dart:66:8: Context: Conflicting declaration 'method4'. // void method4() {} /* Error */ -// ^ +// ^^^^^^^ // // pkg/front_end/testcases/extension_types/implements_conflicts.dart:7:16: Error: The extension type 'ExtensionType1a' can't inherit the member 'method1' as both an extension type member and a non-extension type member. // Try declaring a member 'method1' in 'ExtensionType1a' to resolve the conflict. @@ -60,13 +59,6 @@ library; // void method1() { // ^^^^^^^ // -// pkg/front_end/testcases/extension_types/implements_conflicts.dart:67:12: Error: 'method4' is already declared in this scope. -// void set method4(int value) {} /* Error */ -// ^^^^^^^ -// pkg/front_end/testcases/extension_types/implements_conflicts.dart:66:8: Context: Previous declaration of 'method4'. -// void method4() {} /* Error */ -// ^^^^^^^ -// // pkg/front_end/testcases/extension_types/implements_conflicts.dart:70:16: Error: Can't inherit members that conflict with each other. // extension type ExtensionType9a(ClassJK n) /* Error */ // ^^^^^^^^^^^^^^^ diff --git a/pkg/front_end/testcases/extension_types/implements_conflicts.dart.strong.modular.expect b/pkg/front_end/testcases/extension_types/implements_conflicts.dart.strong.modular.expect index df52d276c25a..6a2a9495a4ea 100644 --- a/pkg/front_end/testcases/extension_types/implements_conflicts.dart.strong.modular.expect +++ b/pkg/front_end/testcases/extension_types/implements_conflicts.dart.strong.modular.expect @@ -2,13 +2,12 @@ library; // // Problems in library: // -// pkg/front_end/testcases/extension_types/implements_conflicts.dart:67:12: Error: Conflicts with member 'method4'. +// pkg/front_end/testcases/extension_types/implements_conflicts.dart:67:12: Error: The setter conflicts with declaration 'method4'. // void set method4(int value) {} /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/implements_conflicts.dart:66:8: Error: Conflicts with setter 'method4'. +// ^^^^^^^ +// pkg/front_end/testcases/extension_types/implements_conflicts.dart:66:8: Context: Conflicting declaration 'method4'. // void method4() {} /* Error */ -// ^ +// ^^^^^^^ // // pkg/front_end/testcases/extension_types/implements_conflicts.dart:7:16: Error: The extension type 'ExtensionType1a' can't inherit the member 'method1' as both an extension type member and a non-extension type member. // Try declaring a member 'method1' in 'ExtensionType1a' to resolve the conflict. @@ -60,13 +59,6 @@ library; // void method1() { // ^^^^^^^ // -// pkg/front_end/testcases/extension_types/implements_conflicts.dart:67:12: Error: 'method4' is already declared in this scope. -// void set method4(int value) {} /* Error */ -// ^^^^^^^ -// pkg/front_end/testcases/extension_types/implements_conflicts.dart:66:8: Context: Previous declaration of 'method4'. -// void method4() {} /* Error */ -// ^^^^^^^ -// // pkg/front_end/testcases/extension_types/implements_conflicts.dart:70:16: Error: Can't inherit members that conflict with each other. // extension type ExtensionType9a(ClassJK n) /* Error */ // ^^^^^^^^^^^^^^^ diff --git a/pkg/front_end/testcases/extension_types/implements_conflicts.dart.strong.outline.expect b/pkg/front_end/testcases/extension_types/implements_conflicts.dart.strong.outline.expect index 7cd093f1c4c7..f6543ab9ef97 100644 --- a/pkg/front_end/testcases/extension_types/implements_conflicts.dart.strong.outline.expect +++ b/pkg/front_end/testcases/extension_types/implements_conflicts.dart.strong.outline.expect @@ -2,13 +2,12 @@ library; // // Problems in library: // -// pkg/front_end/testcases/extension_types/implements_conflicts.dart:67:12: Error: Conflicts with member 'method4'. +// pkg/front_end/testcases/extension_types/implements_conflicts.dart:67:12: Error: The setter conflicts with declaration 'method4'. // void set method4(int value) {} /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/implements_conflicts.dart:66:8: Error: Conflicts with setter 'method4'. +// ^^^^^^^ +// pkg/front_end/testcases/extension_types/implements_conflicts.dart:66:8: Context: Conflicting declaration 'method4'. // void method4() {} /* Error */ -// ^ +// ^^^^^^^ // // pkg/front_end/testcases/extension_types/implements_conflicts.dart:7:16: Error: The extension type 'ExtensionType1a' can't inherit the member 'method1' as both an extension type member and a non-extension type member. // Try declaring a member 'method1' in 'ExtensionType1a' to resolve the conflict. @@ -60,13 +59,6 @@ library; // void method1() { // ^^^^^^^ // -// pkg/front_end/testcases/extension_types/implements_conflicts.dart:67:12: Error: 'method4' is already declared in this scope. -// void set method4(int value) {} /* Error */ -// ^^^^^^^ -// pkg/front_end/testcases/extension_types/implements_conflicts.dart:66:8: Context: Previous declaration of 'method4'. -// void method4() {} /* Error */ -// ^^^^^^^ -// // pkg/front_end/testcases/extension_types/implements_conflicts.dart:70:16: Error: Can't inherit members that conflict with each other. // extension type ExtensionType9a(ClassJK n) /* Error */ // ^^^^^^^^^^^^^^^ diff --git a/pkg/front_end/testcases/extension_types/implements_conflicts.dart.strong.transformed.expect b/pkg/front_end/testcases/extension_types/implements_conflicts.dart.strong.transformed.expect index 66ba6d71e288..3b307e004577 100644 --- a/pkg/front_end/testcases/extension_types/implements_conflicts.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/extension_types/implements_conflicts.dart.strong.transformed.expect @@ -2,13 +2,12 @@ library; // // Problems in library: // -// pkg/front_end/testcases/extension_types/implements_conflicts.dart:67:12: Error: Conflicts with member 'method4'. +// pkg/front_end/testcases/extension_types/implements_conflicts.dart:67:12: Error: The setter conflicts with declaration 'method4'. // void set method4(int value) {} /* Error */ -// ^ -// -// pkg/front_end/testcases/extension_types/implements_conflicts.dart:66:8: Error: Conflicts with setter 'method4'. +// ^^^^^^^ +// pkg/front_end/testcases/extension_types/implements_conflicts.dart:66:8: Context: Conflicting declaration 'method4'. // void method4() {} /* Error */ -// ^ +// ^^^^^^^ // // pkg/front_end/testcases/extension_types/implements_conflicts.dart:7:16: Error: The extension type 'ExtensionType1a' can't inherit the member 'method1' as both an extension type member and a non-extension type member. // Try declaring a member 'method1' in 'ExtensionType1a' to resolve the conflict. @@ -60,13 +59,6 @@ library; // void method1() { // ^^^^^^^ // -// pkg/front_end/testcases/extension_types/implements_conflicts.dart:67:12: Error: 'method4' is already declared in this scope. -// void set method4(int value) {} /* Error */ -// ^^^^^^^ -// pkg/front_end/testcases/extension_types/implements_conflicts.dart:66:8: Context: Previous declaration of 'method4'. -// void method4() {} /* Error */ -// ^^^^^^^ -// // pkg/front_end/testcases/extension_types/implements_conflicts.dart:70:16: Error: Can't inherit members that conflict with each other. // extension type ExtensionType9a(ClassJK n) /* Error */ // ^^^^^^^^^^^^^^^ diff --git a/pkg/front_end/testcases/extensions/extension_member_conflict.dart.strong.expect b/pkg/front_end/testcases/extensions/extension_member_conflict.dart.strong.expect index f5fa0c4b3a7a..a747af3de5aa 100644 --- a/pkg/front_end/testcases/extensions/extension_member_conflict.dart.strong.expect +++ b/pkg/front_end/testcases/extensions/extension_member_conflict.dart.strong.expect @@ -107,6 +107,20 @@ library; // static void set duplicateStaticGetterAndSetter(int value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/extensions/extension_member_conflict.dart:54:19: Error: Static property 'instanceGetterAndStaticSetter' conflicts with instance property of the same name. +// static void set instanceGetterAndStaticSetter(int value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/extensions/extension_member_conflict.dart:53:11: Context: Conflicting instance property 'instanceGetterAndStaticSetter'. +// int get instanceGetterAndStaticSetter => 0; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/extensions/extension_member_conflict.dart:57:12: Error: Instance property 'instanceSetterAndStaticGetter' conflicts with static property of the same name. +// void set instanceSetterAndStaticGetter(int value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/extensions/extension_member_conflict.dart:56:18: Context: Conflicting static property 'instanceSetterAndStaticGetter'. +// static int get instanceSetterAndStaticGetter => 0; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/extensions/extension_member_conflict.dart:60:14: Error: 'instanceGetterAndStaticField' is already declared in this scope. // static int instanceGetterAndStaticField = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -117,25 +131,9 @@ library; // pkg/front_end/testcases/extensions/extension_member_conflict.dart:63:20: Error: 'instanceGetterAndStaticField' is already declared in this scope. // static final int instanceGetterAndStaticField = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/extensions/extension_member_conflict.dart:60:14: Context: Previous declaration of 'instanceGetterAndStaticField'. -// static int instanceGetterAndStaticField = 0; -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// -// pkg/front_end/testcases/extensions/extension_member_conflict.dart:54:19: Error: Conflicts with member 'instanceGetterAndStaticSetter'. -// static void set instanceGetterAndStaticSetter(int value) {} -// ^ -// -// pkg/front_end/testcases/extensions/extension_member_conflict.dart:53:11: Error: Conflicts with setter 'instanceGetterAndStaticSetter'. -// int get instanceGetterAndStaticSetter => 0; -// ^ -// -// pkg/front_end/testcases/extensions/extension_member_conflict.dart:57:12: Error: Conflicts with member 'instanceSetterAndStaticGetter'. -// void set instanceSetterAndStaticGetter(int value) {} -// ^ -// -// pkg/front_end/testcases/extensions/extension_member_conflict.dart:56:18: Error: Conflicts with setter 'instanceSetterAndStaticGetter'. -// static int get instanceSetterAndStaticGetter => 0; -// ^ +// pkg/front_end/testcases/extensions/extension_member_conflict.dart:59:11: Context: Previous declaration of 'instanceGetterAndStaticField'. +// int get instanceGetterAndStaticField => 0; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/extensions/extension_member_conflict.dart.strong.modular.expect b/pkg/front_end/testcases/extensions/extension_member_conflict.dart.strong.modular.expect index f5fa0c4b3a7a..a747af3de5aa 100644 --- a/pkg/front_end/testcases/extensions/extension_member_conflict.dart.strong.modular.expect +++ b/pkg/front_end/testcases/extensions/extension_member_conflict.dart.strong.modular.expect @@ -107,6 +107,20 @@ library; // static void set duplicateStaticGetterAndSetter(int value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/extensions/extension_member_conflict.dart:54:19: Error: Static property 'instanceGetterAndStaticSetter' conflicts with instance property of the same name. +// static void set instanceGetterAndStaticSetter(int value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/extensions/extension_member_conflict.dart:53:11: Context: Conflicting instance property 'instanceGetterAndStaticSetter'. +// int get instanceGetterAndStaticSetter => 0; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/extensions/extension_member_conflict.dart:57:12: Error: Instance property 'instanceSetterAndStaticGetter' conflicts with static property of the same name. +// void set instanceSetterAndStaticGetter(int value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/extensions/extension_member_conflict.dart:56:18: Context: Conflicting static property 'instanceSetterAndStaticGetter'. +// static int get instanceSetterAndStaticGetter => 0; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/extensions/extension_member_conflict.dart:60:14: Error: 'instanceGetterAndStaticField' is already declared in this scope. // static int instanceGetterAndStaticField = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -117,25 +131,9 @@ library; // pkg/front_end/testcases/extensions/extension_member_conflict.dart:63:20: Error: 'instanceGetterAndStaticField' is already declared in this scope. // static final int instanceGetterAndStaticField = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/extensions/extension_member_conflict.dart:60:14: Context: Previous declaration of 'instanceGetterAndStaticField'. -// static int instanceGetterAndStaticField = 0; -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// -// pkg/front_end/testcases/extensions/extension_member_conflict.dart:54:19: Error: Conflicts with member 'instanceGetterAndStaticSetter'. -// static void set instanceGetterAndStaticSetter(int value) {} -// ^ -// -// pkg/front_end/testcases/extensions/extension_member_conflict.dart:53:11: Error: Conflicts with setter 'instanceGetterAndStaticSetter'. -// int get instanceGetterAndStaticSetter => 0; -// ^ -// -// pkg/front_end/testcases/extensions/extension_member_conflict.dart:57:12: Error: Conflicts with member 'instanceSetterAndStaticGetter'. -// void set instanceSetterAndStaticGetter(int value) {} -// ^ -// -// pkg/front_end/testcases/extensions/extension_member_conflict.dart:56:18: Error: Conflicts with setter 'instanceSetterAndStaticGetter'. -// static int get instanceSetterAndStaticGetter => 0; -// ^ +// pkg/front_end/testcases/extensions/extension_member_conflict.dart:59:11: Context: Previous declaration of 'instanceGetterAndStaticField'. +// int get instanceGetterAndStaticField => 0; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/extensions/extension_member_conflict.dart.strong.outline.expect b/pkg/front_end/testcases/extensions/extension_member_conflict.dart.strong.outline.expect index 0ab5ecb0fb59..5f6b91860f94 100644 --- a/pkg/front_end/testcases/extensions/extension_member_conflict.dart.strong.outline.expect +++ b/pkg/front_end/testcases/extensions/extension_member_conflict.dart.strong.outline.expect @@ -107,6 +107,20 @@ library; // static void set duplicateStaticGetterAndSetter(int value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/extensions/extension_member_conflict.dart:54:19: Error: Static property 'instanceGetterAndStaticSetter' conflicts with instance property of the same name. +// static void set instanceGetterAndStaticSetter(int value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/extensions/extension_member_conflict.dart:53:11: Context: Conflicting instance property 'instanceGetterAndStaticSetter'. +// int get instanceGetterAndStaticSetter => 0; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/extensions/extension_member_conflict.dart:57:12: Error: Instance property 'instanceSetterAndStaticGetter' conflicts with static property of the same name. +// void set instanceSetterAndStaticGetter(int value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/extensions/extension_member_conflict.dart:56:18: Context: Conflicting static property 'instanceSetterAndStaticGetter'. +// static int get instanceSetterAndStaticGetter => 0; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/extensions/extension_member_conflict.dart:60:14: Error: 'instanceGetterAndStaticField' is already declared in this scope. // static int instanceGetterAndStaticField = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -117,25 +131,9 @@ library; // pkg/front_end/testcases/extensions/extension_member_conflict.dart:63:20: Error: 'instanceGetterAndStaticField' is already declared in this scope. // static final int instanceGetterAndStaticField = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/extensions/extension_member_conflict.dart:60:14: Context: Previous declaration of 'instanceGetterAndStaticField'. -// static int instanceGetterAndStaticField = 0; -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// -// pkg/front_end/testcases/extensions/extension_member_conflict.dart:54:19: Error: Conflicts with member 'instanceGetterAndStaticSetter'. -// static void set instanceGetterAndStaticSetter(int value) {} -// ^ -// -// pkg/front_end/testcases/extensions/extension_member_conflict.dart:53:11: Error: Conflicts with setter 'instanceGetterAndStaticSetter'. -// int get instanceGetterAndStaticSetter => 0; -// ^ -// -// pkg/front_end/testcases/extensions/extension_member_conflict.dart:57:12: Error: Conflicts with member 'instanceSetterAndStaticGetter'. -// void set instanceSetterAndStaticGetter(int value) {} -// ^ -// -// pkg/front_end/testcases/extensions/extension_member_conflict.dart:56:18: Error: Conflicts with setter 'instanceSetterAndStaticGetter'. -// static int get instanceSetterAndStaticGetter => 0; -// ^ +// pkg/front_end/testcases/extensions/extension_member_conflict.dart:59:11: Context: Previous declaration of 'instanceGetterAndStaticField'. +// int get instanceGetterAndStaticField => 0; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/extensions/extension_member_conflict.dart.strong.transformed.expect b/pkg/front_end/testcases/extensions/extension_member_conflict.dart.strong.transformed.expect index f5fa0c4b3a7a..a747af3de5aa 100644 --- a/pkg/front_end/testcases/extensions/extension_member_conflict.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/extensions/extension_member_conflict.dart.strong.transformed.expect @@ -107,6 +107,20 @@ library; // static void set duplicateStaticGetterAndSetter(int value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/extensions/extension_member_conflict.dart:54:19: Error: Static property 'instanceGetterAndStaticSetter' conflicts with instance property of the same name. +// static void set instanceGetterAndStaticSetter(int value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/extensions/extension_member_conflict.dart:53:11: Context: Conflicting instance property 'instanceGetterAndStaticSetter'. +// int get instanceGetterAndStaticSetter => 0; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/extensions/extension_member_conflict.dart:57:12: Error: Instance property 'instanceSetterAndStaticGetter' conflicts with static property of the same name. +// void set instanceSetterAndStaticGetter(int value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/extensions/extension_member_conflict.dart:56:18: Context: Conflicting static property 'instanceSetterAndStaticGetter'. +// static int get instanceSetterAndStaticGetter => 0; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/extensions/extension_member_conflict.dart:60:14: Error: 'instanceGetterAndStaticField' is already declared in this scope. // static int instanceGetterAndStaticField = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -117,25 +131,9 @@ library; // pkg/front_end/testcases/extensions/extension_member_conflict.dart:63:20: Error: 'instanceGetterAndStaticField' is already declared in this scope. // static final int instanceGetterAndStaticField = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/extensions/extension_member_conflict.dart:60:14: Context: Previous declaration of 'instanceGetterAndStaticField'. -// static int instanceGetterAndStaticField = 0; -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// -// pkg/front_end/testcases/extensions/extension_member_conflict.dart:54:19: Error: Conflicts with member 'instanceGetterAndStaticSetter'. -// static void set instanceGetterAndStaticSetter(int value) {} -// ^ -// -// pkg/front_end/testcases/extensions/extension_member_conflict.dart:53:11: Error: Conflicts with setter 'instanceGetterAndStaticSetter'. -// int get instanceGetterAndStaticSetter => 0; -// ^ -// -// pkg/front_end/testcases/extensions/extension_member_conflict.dart:57:12: Error: Conflicts with member 'instanceSetterAndStaticGetter'. -// void set instanceSetterAndStaticGetter(int value) {} -// ^ -// -// pkg/front_end/testcases/extensions/extension_member_conflict.dart:56:18: Error: Conflicts with setter 'instanceSetterAndStaticGetter'. -// static int get instanceSetterAndStaticGetter => 0; -// ^ +// pkg/front_end/testcases/extensions/extension_member_conflict.dart:59:11: Context: Previous declaration of 'instanceGetterAndStaticField'. +// int get instanceGetterAndStaticField => 0; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/extensions/issue38713.dart.strong.expect b/pkg/front_end/testcases/extensions/issue38713.dart.strong.expect index c8c54861899f..0b4c055e84d7 100644 --- a/pkg/front_end/testcases/extensions/issue38713.dart.strong.expect +++ b/pkg/front_end/testcases/extensions/issue38713.dart.strong.expect @@ -4,19 +4,17 @@ library; // // pkg/front_end/testcases/extensions/issue38713.dart:7:19: Error: Conflicts with the implicit setter of the field 'property2'. // static void set property2(int? x) {} -// ^ -// -// pkg/front_end/testcases/extensions/issue38713.dart:6:15: Error: Conflicts with setter 'property2'. +// ^^^^^^^^^ +// pkg/front_end/testcases/extensions/issue38713.dart:6:15: Context: Field 'property2' with the implicit setter. // static int? property2; -// ^ -// -// pkg/front_end/testcases/extensions/issue38713.dart:9:19: Error: Conflicts with member 'property3'. -// static void set property3(int? x) {} -// ^ +// ^^^^^^^^^ // -// pkg/front_end/testcases/extensions/issue38713.dart:10:12: Error: Conflicts with setter 'property3'. +// pkg/front_end/testcases/extensions/issue38713.dart:10:12: Error: Instance property 'property3' conflicts with static property of the same name. // int? get property3 => 1; -// ^ +// ^^^^^^^^^ +// pkg/front_end/testcases/extensions/issue38713.dart:9:19: Context: Conflicting static property 'property3'. +// static void set property3(int? x) {} +// ^^^^^^^^^ // import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/extensions/issue38713.dart.strong.modular.expect b/pkg/front_end/testcases/extensions/issue38713.dart.strong.modular.expect index c8c54861899f..0b4c055e84d7 100644 --- a/pkg/front_end/testcases/extensions/issue38713.dart.strong.modular.expect +++ b/pkg/front_end/testcases/extensions/issue38713.dart.strong.modular.expect @@ -4,19 +4,17 @@ library; // // pkg/front_end/testcases/extensions/issue38713.dart:7:19: Error: Conflicts with the implicit setter of the field 'property2'. // static void set property2(int? x) {} -// ^ -// -// pkg/front_end/testcases/extensions/issue38713.dart:6:15: Error: Conflicts with setter 'property2'. +// ^^^^^^^^^ +// pkg/front_end/testcases/extensions/issue38713.dart:6:15: Context: Field 'property2' with the implicit setter. // static int? property2; -// ^ -// -// pkg/front_end/testcases/extensions/issue38713.dart:9:19: Error: Conflicts with member 'property3'. -// static void set property3(int? x) {} -// ^ +// ^^^^^^^^^ // -// pkg/front_end/testcases/extensions/issue38713.dart:10:12: Error: Conflicts with setter 'property3'. +// pkg/front_end/testcases/extensions/issue38713.dart:10:12: Error: Instance property 'property3' conflicts with static property of the same name. // int? get property3 => 1; -// ^ +// ^^^^^^^^^ +// pkg/front_end/testcases/extensions/issue38713.dart:9:19: Context: Conflicting static property 'property3'. +// static void set property3(int? x) {} +// ^^^^^^^^^ // import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/extensions/issue38713.dart.strong.outline.expect b/pkg/front_end/testcases/extensions/issue38713.dart.strong.outline.expect index fded1d744e53..2d6cb2b1ae6e 100644 --- a/pkg/front_end/testcases/extensions/issue38713.dart.strong.outline.expect +++ b/pkg/front_end/testcases/extensions/issue38713.dart.strong.outline.expect @@ -4,19 +4,17 @@ library; // // pkg/front_end/testcases/extensions/issue38713.dart:7:19: Error: Conflicts with the implicit setter of the field 'property2'. // static void set property2(int? x) {} -// ^ -// -// pkg/front_end/testcases/extensions/issue38713.dart:6:15: Error: Conflicts with setter 'property2'. +// ^^^^^^^^^ +// pkg/front_end/testcases/extensions/issue38713.dart:6:15: Context: Field 'property2' with the implicit setter. // static int? property2; -// ^ -// -// pkg/front_end/testcases/extensions/issue38713.dart:9:19: Error: Conflicts with member 'property3'. -// static void set property3(int? x) {} -// ^ +// ^^^^^^^^^ // -// pkg/front_end/testcases/extensions/issue38713.dart:10:12: Error: Conflicts with setter 'property3'. +// pkg/front_end/testcases/extensions/issue38713.dart:10:12: Error: Instance property 'property3' conflicts with static property of the same name. // int? get property3 => 1; -// ^ +// ^^^^^^^^^ +// pkg/front_end/testcases/extensions/issue38713.dart:9:19: Context: Conflicting static property 'property3'. +// static void set property3(int? x) {} +// ^^^^^^^^^ // import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/extensions/issue38713.dart.strong.transformed.expect b/pkg/front_end/testcases/extensions/issue38713.dart.strong.transformed.expect index c8c54861899f..0b4c055e84d7 100644 --- a/pkg/front_end/testcases/extensions/issue38713.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/extensions/issue38713.dart.strong.transformed.expect @@ -4,19 +4,17 @@ library; // // pkg/front_end/testcases/extensions/issue38713.dart:7:19: Error: Conflicts with the implicit setter of the field 'property2'. // static void set property2(int? x) {} -// ^ -// -// pkg/front_end/testcases/extensions/issue38713.dart:6:15: Error: Conflicts with setter 'property2'. +// ^^^^^^^^^ +// pkg/front_end/testcases/extensions/issue38713.dart:6:15: Context: Field 'property2' with the implicit setter. // static int? property2; -// ^ -// -// pkg/front_end/testcases/extensions/issue38713.dart:9:19: Error: Conflicts with member 'property3'. -// static void set property3(int? x) {} -// ^ +// ^^^^^^^^^ // -// pkg/front_end/testcases/extensions/issue38713.dart:10:12: Error: Conflicts with setter 'property3'. +// pkg/front_end/testcases/extensions/issue38713.dart:10:12: Error: Instance property 'property3' conflicts with static property of the same name. // int? get property3 => 1; -// ^ +// ^^^^^^^^^ +// pkg/front_end/testcases/extensions/issue38713.dart:9:19: Context: Conflicting static property 'property3'. +// static void set property3(int? x) {} +// ^^^^^^^^^ // import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/extensions/issue38745.dart.strong.expect b/pkg/front_end/testcases/extensions/issue38745.dart.strong.expect index 5ce18de8911a..a93c67c12eae 100644 --- a/pkg/front_end/testcases/extensions/issue38745.dart.strong.expect +++ b/pkg/front_end/testcases/extensions/issue38745.dart.strong.expect @@ -17,13 +17,12 @@ library; // final int property2 = 42; // ^^^^^^^^^ // -// pkg/front_end/testcases/extensions/issue38745.dart:17:19: Error: Conflicts with member 'property2'. +// pkg/front_end/testcases/extensions/issue38745.dart:17:19: Error: Static property 'property2' conflicts with instance property of the same name. // static void set property2(int value) {} -// ^ -// -// pkg/front_end/testcases/extensions/issue38745.dart:15:13: Error: Conflicts with setter 'property2'. +// ^^^^^^^^^ +// pkg/front_end/testcases/extensions/issue38745.dart:15:13: Context: Conflicting instance property 'property2'. // final int property2 = 42; -// ^ +// ^^^^^^^^^ // // pkg/front_end/testcases/extensions/issue38745.dart:20:5: Error: Undefined name 'field'. // field; diff --git a/pkg/front_end/testcases/extensions/issue38745.dart.strong.modular.expect b/pkg/front_end/testcases/extensions/issue38745.dart.strong.modular.expect index 5ce18de8911a..a93c67c12eae 100644 --- a/pkg/front_end/testcases/extensions/issue38745.dart.strong.modular.expect +++ b/pkg/front_end/testcases/extensions/issue38745.dart.strong.modular.expect @@ -17,13 +17,12 @@ library; // final int property2 = 42; // ^^^^^^^^^ // -// pkg/front_end/testcases/extensions/issue38745.dart:17:19: Error: Conflicts with member 'property2'. +// pkg/front_end/testcases/extensions/issue38745.dart:17:19: Error: Static property 'property2' conflicts with instance property of the same name. // static void set property2(int value) {} -// ^ -// -// pkg/front_end/testcases/extensions/issue38745.dart:15:13: Error: Conflicts with setter 'property2'. +// ^^^^^^^^^ +// pkg/front_end/testcases/extensions/issue38745.dart:15:13: Context: Conflicting instance property 'property2'. // final int property2 = 42; -// ^ +// ^^^^^^^^^ // // pkg/front_end/testcases/extensions/issue38745.dart:20:5: Error: Undefined name 'field'. // field; diff --git a/pkg/front_end/testcases/extensions/issue38745.dart.strong.outline.expect b/pkg/front_end/testcases/extensions/issue38745.dart.strong.outline.expect index 9600ef89ceb5..51ade4cd817d 100644 --- a/pkg/front_end/testcases/extensions/issue38745.dart.strong.outline.expect +++ b/pkg/front_end/testcases/extensions/issue38745.dart.strong.outline.expect @@ -17,13 +17,12 @@ library; // final int property2 = 42; // ^^^^^^^^^ // -// pkg/front_end/testcases/extensions/issue38745.dart:17:19: Error: Conflicts with member 'property2'. +// pkg/front_end/testcases/extensions/issue38745.dart:17:19: Error: Static property 'property2' conflicts with instance property of the same name. // static void set property2(int value) {} -// ^ -// -// pkg/front_end/testcases/extensions/issue38745.dart:15:13: Error: Conflicts with setter 'property2'. +// ^^^^^^^^^ +// pkg/front_end/testcases/extensions/issue38745.dart:15:13: Context: Conflicting instance property 'property2'. // final int property2 = 42; -// ^ +// ^^^^^^^^^ // import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/extensions/issue38745.dart.strong.transformed.expect b/pkg/front_end/testcases/extensions/issue38745.dart.strong.transformed.expect index 5ce18de8911a..a93c67c12eae 100644 --- a/pkg/front_end/testcases/extensions/issue38745.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/extensions/issue38745.dart.strong.transformed.expect @@ -17,13 +17,12 @@ library; // final int property2 = 42; // ^^^^^^^^^ // -// pkg/front_end/testcases/extensions/issue38745.dart:17:19: Error: Conflicts with member 'property2'. +// pkg/front_end/testcases/extensions/issue38745.dart:17:19: Error: Static property 'property2' conflicts with instance property of the same name. // static void set property2(int value) {} -// ^ -// -// pkg/front_end/testcases/extensions/issue38745.dart:15:13: Error: Conflicts with setter 'property2'. +// ^^^^^^^^^ +// pkg/front_end/testcases/extensions/issue38745.dart:15:13: Context: Conflicting instance property 'property2'. // final int property2 = 42; -// ^ +// ^^^^^^^^^ // // pkg/front_end/testcases/extensions/issue38745.dart:20:5: Error: Undefined name 'field'. // field; diff --git a/pkg/front_end/testcases/general/const_vs_setter.dart b/pkg/front_end/testcases/general/const_vs_setter.dart new file mode 100644 index 000000000000..48fd911ab675 --- /dev/null +++ b/pkg/front_end/testcases/general/const_vs_setter.dart @@ -0,0 +1,20 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// 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. + +const a = 42; +set a(_) {} + +const int b = 87; +void set b(int value) {} + +class Class { + static const c = 42; + static set c(_) {} + + static const int d = 87; + static void set d(int value) {} + + static const e = 123; + void set e(_) {} +} diff --git a/pkg/front_end/testcases/general/const_vs_setter.dart.strong.expect b/pkg/front_end/testcases/general/const_vs_setter.dart.strong.expect new file mode 100644 index 000000000000..94e70e406e2e --- /dev/null +++ b/pkg/front_end/testcases/general/const_vs_setter.dart.strong.expect @@ -0,0 +1,42 @@ +library; +// +// Problems in library: +// +// pkg/front_end/testcases/general/const_vs_setter.dart:19:12: Error: Instance property 'e' conflicts with static property of the same name. +// void set e(_) {} +// ^ +// pkg/front_end/testcases/general/const_vs_setter.dart:18:16: Context: Conflicting static property 'e'. +// static const e = 123; +// ^ +// +// pkg/front_end/testcases/general/const_vs_setter.dart:18:16: Error: This static member conflicts with an instance member. +// static const e = 123; +// ^ +// pkg/front_end/testcases/general/const_vs_setter.dart:19:12: Context: This is the instance member. +// void set e(_) {} +// ^ +// +import self as self; +import "dart:core" as core; + +class Class extends core::Object { + static const field core::int c = #C1; + static const field core::int d = #C2; + static const field core::int e = #C3; + synthetic constructor •() → self::Class + : super core::Object::•() + ; + static set c(wildcard dynamic _#wc1#formal) → void {} + static set d(core::int value) → void {} + set e(wildcard dynamic _#wc2#formal) → void {} +} +static const field core::int a = #C1; +static const field core::int b = #C2; +static set a(wildcard dynamic _#wc0#formal) → void {} +static set b(core::int value) → void {} + +constants { + #C1 = 42 + #C2 = 87 + #C3 = 123 +} diff --git a/pkg/front_end/testcases/general/const_vs_setter.dart.strong.modular.expect b/pkg/front_end/testcases/general/const_vs_setter.dart.strong.modular.expect new file mode 100644 index 000000000000..94e70e406e2e --- /dev/null +++ b/pkg/front_end/testcases/general/const_vs_setter.dart.strong.modular.expect @@ -0,0 +1,42 @@ +library; +// +// Problems in library: +// +// pkg/front_end/testcases/general/const_vs_setter.dart:19:12: Error: Instance property 'e' conflicts with static property of the same name. +// void set e(_) {} +// ^ +// pkg/front_end/testcases/general/const_vs_setter.dart:18:16: Context: Conflicting static property 'e'. +// static const e = 123; +// ^ +// +// pkg/front_end/testcases/general/const_vs_setter.dart:18:16: Error: This static member conflicts with an instance member. +// static const e = 123; +// ^ +// pkg/front_end/testcases/general/const_vs_setter.dart:19:12: Context: This is the instance member. +// void set e(_) {} +// ^ +// +import self as self; +import "dart:core" as core; + +class Class extends core::Object { + static const field core::int c = #C1; + static const field core::int d = #C2; + static const field core::int e = #C3; + synthetic constructor •() → self::Class + : super core::Object::•() + ; + static set c(wildcard dynamic _#wc1#formal) → void {} + static set d(core::int value) → void {} + set e(wildcard dynamic _#wc2#formal) → void {} +} +static const field core::int a = #C1; +static const field core::int b = #C2; +static set a(wildcard dynamic _#wc0#formal) → void {} +static set b(core::int value) → void {} + +constants { + #C1 = 42 + #C2 = 87 + #C3 = 123 +} diff --git a/pkg/front_end/testcases/general/const_vs_setter.dart.strong.outline.expect b/pkg/front_end/testcases/general/const_vs_setter.dart.strong.outline.expect new file mode 100644 index 000000000000..3cfa9c3392a5 --- /dev/null +++ b/pkg/front_end/testcases/general/const_vs_setter.dart.strong.outline.expect @@ -0,0 +1,40 @@ +library; +// +// Problems in library: +// +// pkg/front_end/testcases/general/const_vs_setter.dart:19:12: Error: Instance property 'e' conflicts with static property of the same name. +// void set e(_) {} +// ^ +// pkg/front_end/testcases/general/const_vs_setter.dart:18:16: Context: Conflicting static property 'e'. +// static const e = 123; +// ^ +// +// pkg/front_end/testcases/general/const_vs_setter.dart:18:16: Error: This static member conflicts with an instance member. +// static const e = 123; +// ^ +// pkg/front_end/testcases/general/const_vs_setter.dart:19:12: Context: This is the instance member. +// void set e(_) {} +// ^ +// +import self as self; +import "dart:core" as core; + +class Class extends core::Object { + static const field core::int c = 42; + static const field core::int d = 87; + static const field core::int e = 123; + synthetic constructor •() → self::Class + ; + static set c(wildcard dynamic _#wc1#formal) → void + ; + static set d(core::int value) → void + ; + set e(wildcard dynamic _#wc2#formal) → void + ; +} +static const field core::int a = 42; +static const field core::int b = 87; +static set a(wildcard dynamic _#wc0#formal) → void + ; +static set b(core::int value) → void + ; diff --git a/pkg/front_end/testcases/general/const_vs_setter.dart.strong.transformed.expect b/pkg/front_end/testcases/general/const_vs_setter.dart.strong.transformed.expect new file mode 100644 index 000000000000..94e70e406e2e --- /dev/null +++ b/pkg/front_end/testcases/general/const_vs_setter.dart.strong.transformed.expect @@ -0,0 +1,42 @@ +library; +// +// Problems in library: +// +// pkg/front_end/testcases/general/const_vs_setter.dart:19:12: Error: Instance property 'e' conflicts with static property of the same name. +// void set e(_) {} +// ^ +// pkg/front_end/testcases/general/const_vs_setter.dart:18:16: Context: Conflicting static property 'e'. +// static const e = 123; +// ^ +// +// pkg/front_end/testcases/general/const_vs_setter.dart:18:16: Error: This static member conflicts with an instance member. +// static const e = 123; +// ^ +// pkg/front_end/testcases/general/const_vs_setter.dart:19:12: Context: This is the instance member. +// void set e(_) {} +// ^ +// +import self as self; +import "dart:core" as core; + +class Class extends core::Object { + static const field core::int c = #C1; + static const field core::int d = #C2; + static const field core::int e = #C3; + synthetic constructor •() → self::Class + : super core::Object::•() + ; + static set c(wildcard dynamic _#wc1#formal) → void {} + static set d(core::int value) → void {} + set e(wildcard dynamic _#wc2#formal) → void {} +} +static const field core::int a = #C1; +static const field core::int b = #C2; +static set a(wildcard dynamic _#wc0#formal) → void {} +static set b(core::int value) → void {} + +constants { + #C1 = 42 + #C2 = 87 + #C3 = 123 +} diff --git a/pkg/front_end/testcases/general/const_vs_setter.dart.textual_outline.expect b/pkg/front_end/testcases/general/const_vs_setter.dart.textual_outline.expect new file mode 100644 index 000000000000..17e8493313fa --- /dev/null +++ b/pkg/front_end/testcases/general/const_vs_setter.dart.textual_outline.expect @@ -0,0 +1,16 @@ +const a = 42; + +set a(_) {} + +const int b = 87; + +void set b(int value) {} + +class Class { + static const c = 42; + static set c(_) {} + static const int d = 87; + static void set d(int value) {} + static const e = 123; + void set e(_) {} +} diff --git a/pkg/front_end/testcases/general/const_vs_setter.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/const_vs_setter.dart.textual_outline_modelled.expect new file mode 100644 index 000000000000..90abccc436fb --- /dev/null +++ b/pkg/front_end/testcases/general/const_vs_setter.dart.textual_outline_modelled.expect @@ -0,0 +1,16 @@ +class Class { + static const c = 42; + static const e = 123; + static const int d = 87; + static set c(_) {} + static void set d(int value) {} + void set e(_) {} +} + +const a = 42; + +const int b = 87; + +set a(_) {} + +void set b(int value) {} diff --git a/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.expect b/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.expect index 5c9390951201..590a7fc916d7 100644 --- a/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.expect +++ b/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.expect @@ -42,14 +42,14 @@ library; // pkg/front_end/testcases/general/duplicated_declarations_part.dart:13:9: Error: 'Typedef' is already declared in this scope. // typedef Typedef = void Function(); // ^^^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:15:9: Context: Previous declaration of 'Typedef'. -// typedef Typedef = Object Function(); +// pkg/front_end/testcases/general/duplicated_declarations.dart:13:9: Context: Previous declaration of 'Typedef'. +// typedef Typedef = void Function(); // ^^^^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:15:9: Error: 'Typedef' is already declared in this scope. // typedef Typedef = Object Function(); // ^^^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:13:9: Context: Previous declaration of 'Typedef'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:13:9: Context: Previous declaration of 'Typedef'. // typedef Typedef = void Function(); // ^^^^^^^ // @@ -63,14 +63,14 @@ library; // pkg/front_end/testcases/general/duplicated_declarations_part.dart:19:14: Error: 'OldTypedef' is already declared in this scope. // typedef void OldTypedef(); // ^^^^^^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:21:16: Context: Previous declaration of 'OldTypedef'. -// typedef Object OldTypedef(); -// ^^^^^^^^^^ +// pkg/front_end/testcases/general/duplicated_declarations.dart:19:14: Context: Previous declaration of 'OldTypedef'. +// typedef void OldTypedef(); +// ^^^^^^^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:21:16: Error: 'OldTypedef' is already declared in this scope. // typedef Object OldTypedef(); // ^^^^^^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:19:14: Context: Previous declaration of 'OldTypedef'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:19:14: Context: Previous declaration of 'OldTypedef'. // typedef void OldTypedef(); // ^^^^^^^^^^ // @@ -84,22 +84,22 @@ library; // pkg/front_end/testcases/general/duplicated_declarations_part.dart:23:5: Error: 'field' is already declared in this scope. // var field = "3rd"; // ^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:25:5: Context: Previous declaration of 'field'. -// var field = "2nd"; +// pkg/front_end/testcases/general/duplicated_declarations.dart:23:5: Context: Previous declaration of 'field'. +// var field = "1st"; // ^^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:25:5: Error: 'field' is already declared in this scope. // var field = 4; // ^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:23:5: Context: Previous declaration of 'field'. -// var field = "3rd"; +// pkg/front_end/testcases/general/duplicated_declarations.dart:23:5: Context: Previous declaration of 'field'. +// var field = "1st"; // ^^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:27:5: Error: 'field' is already declared in this scope. // var field = 5.0; // ^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:25:5: Context: Previous declaration of 'field'. -// var field = 4; +// pkg/front_end/testcases/general/duplicated_declarations.dart:23:5: Context: Previous declaration of 'field'. +// var field = "1st"; // ^^^^^ // // pkg/front_end/testcases/general/duplicated_declarations.dart:31:1: Error: 'main' is already declared in this scope. @@ -112,21 +112,21 @@ library; // pkg/front_end/testcases/general/duplicated_declarations_part.dart:29:1: Error: 'main' is already declared in this scope. // main() { // ^^^^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:31:1: Context: Previous declaration of 'main'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:27:1: Context: Previous declaration of 'main'. // main() { // ^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:33:1: Error: 'main' is already declared in this scope. // main() { // ^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:29:1: Context: Previous declaration of 'main'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:27:1: Context: Previous declaration of 'main'. // main() { // ^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:37:1: Error: 'main' is already declared in this scope. // main() { // ^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:33:1: Context: Previous declaration of 'main'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:27:1: Context: Previous declaration of 'main'. // main() { // ^^^^ // @@ -140,21 +140,21 @@ library; // pkg/front_end/testcases/general/duplicated_declarations_part.dart:41:7: Error: 'C' is already declared in this scope. // class C { // ^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:74:7: Context: Previous declaration of 'C'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:43:7: Context: Previous declaration of 'C'. // class C { // ^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:67:7: Error: 'C' is already declared in this scope. // class C { // ^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:41:7: Context: Previous declaration of 'C'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:43:7: Context: Previous declaration of 'C'. // class C { // ^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:71:7: Error: 'C' is already declared in this scope. // class C { // ^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:67:7: Context: Previous declaration of 'C'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:43:7: Context: Previous declaration of 'C'. // class C { // ^ // @@ -168,21 +168,21 @@ library; // pkg/front_end/testcases/general/duplicated_declarations_part.dart:75:6: Error: 'Enum' is already declared in this scope. // enum Enum { // ^^^^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:85:6: Context: Previous declaration of 'Enum'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:78:6: Context: Previous declaration of 'Enum'. // enum Enum { // ^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:82:6: Error: 'Enum' is already declared in this scope. // enum Enum { // ^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:75:6: Context: Previous declaration of 'Enum'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:78:6: Context: Previous declaration of 'Enum'. // enum Enum { // ^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:88:6: Error: 'Enum' is already declared in this scope. // enum Enum { // ^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:82:6: Context: Previous declaration of 'Enum'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:78:6: Context: Previous declaration of 'Enum'. // enum Enum { // ^^^^ // diff --git a/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.modular.expect b/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.modular.expect index 5c9390951201..590a7fc916d7 100644 --- a/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.modular.expect @@ -42,14 +42,14 @@ library; // pkg/front_end/testcases/general/duplicated_declarations_part.dart:13:9: Error: 'Typedef' is already declared in this scope. // typedef Typedef = void Function(); // ^^^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:15:9: Context: Previous declaration of 'Typedef'. -// typedef Typedef = Object Function(); +// pkg/front_end/testcases/general/duplicated_declarations.dart:13:9: Context: Previous declaration of 'Typedef'. +// typedef Typedef = void Function(); // ^^^^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:15:9: Error: 'Typedef' is already declared in this scope. // typedef Typedef = Object Function(); // ^^^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:13:9: Context: Previous declaration of 'Typedef'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:13:9: Context: Previous declaration of 'Typedef'. // typedef Typedef = void Function(); // ^^^^^^^ // @@ -63,14 +63,14 @@ library; // pkg/front_end/testcases/general/duplicated_declarations_part.dart:19:14: Error: 'OldTypedef' is already declared in this scope. // typedef void OldTypedef(); // ^^^^^^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:21:16: Context: Previous declaration of 'OldTypedef'. -// typedef Object OldTypedef(); -// ^^^^^^^^^^ +// pkg/front_end/testcases/general/duplicated_declarations.dart:19:14: Context: Previous declaration of 'OldTypedef'. +// typedef void OldTypedef(); +// ^^^^^^^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:21:16: Error: 'OldTypedef' is already declared in this scope. // typedef Object OldTypedef(); // ^^^^^^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:19:14: Context: Previous declaration of 'OldTypedef'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:19:14: Context: Previous declaration of 'OldTypedef'. // typedef void OldTypedef(); // ^^^^^^^^^^ // @@ -84,22 +84,22 @@ library; // pkg/front_end/testcases/general/duplicated_declarations_part.dart:23:5: Error: 'field' is already declared in this scope. // var field = "3rd"; // ^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:25:5: Context: Previous declaration of 'field'. -// var field = "2nd"; +// pkg/front_end/testcases/general/duplicated_declarations.dart:23:5: Context: Previous declaration of 'field'. +// var field = "1st"; // ^^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:25:5: Error: 'field' is already declared in this scope. // var field = 4; // ^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:23:5: Context: Previous declaration of 'field'. -// var field = "3rd"; +// pkg/front_end/testcases/general/duplicated_declarations.dart:23:5: Context: Previous declaration of 'field'. +// var field = "1st"; // ^^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:27:5: Error: 'field' is already declared in this scope. // var field = 5.0; // ^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:25:5: Context: Previous declaration of 'field'. -// var field = 4; +// pkg/front_end/testcases/general/duplicated_declarations.dart:23:5: Context: Previous declaration of 'field'. +// var field = "1st"; // ^^^^^ // // pkg/front_end/testcases/general/duplicated_declarations.dart:31:1: Error: 'main' is already declared in this scope. @@ -112,21 +112,21 @@ library; // pkg/front_end/testcases/general/duplicated_declarations_part.dart:29:1: Error: 'main' is already declared in this scope. // main() { // ^^^^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:31:1: Context: Previous declaration of 'main'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:27:1: Context: Previous declaration of 'main'. // main() { // ^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:33:1: Error: 'main' is already declared in this scope. // main() { // ^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:29:1: Context: Previous declaration of 'main'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:27:1: Context: Previous declaration of 'main'. // main() { // ^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:37:1: Error: 'main' is already declared in this scope. // main() { // ^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:33:1: Context: Previous declaration of 'main'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:27:1: Context: Previous declaration of 'main'. // main() { // ^^^^ // @@ -140,21 +140,21 @@ library; // pkg/front_end/testcases/general/duplicated_declarations_part.dart:41:7: Error: 'C' is already declared in this scope. // class C { // ^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:74:7: Context: Previous declaration of 'C'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:43:7: Context: Previous declaration of 'C'. // class C { // ^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:67:7: Error: 'C' is already declared in this scope. // class C { // ^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:41:7: Context: Previous declaration of 'C'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:43:7: Context: Previous declaration of 'C'. // class C { // ^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:71:7: Error: 'C' is already declared in this scope. // class C { // ^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:67:7: Context: Previous declaration of 'C'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:43:7: Context: Previous declaration of 'C'. // class C { // ^ // @@ -168,21 +168,21 @@ library; // pkg/front_end/testcases/general/duplicated_declarations_part.dart:75:6: Error: 'Enum' is already declared in this scope. // enum Enum { // ^^^^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:85:6: Context: Previous declaration of 'Enum'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:78:6: Context: Previous declaration of 'Enum'. // enum Enum { // ^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:82:6: Error: 'Enum' is already declared in this scope. // enum Enum { // ^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:75:6: Context: Previous declaration of 'Enum'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:78:6: Context: Previous declaration of 'Enum'. // enum Enum { // ^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:88:6: Error: 'Enum' is already declared in this scope. // enum Enum { // ^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:82:6: Context: Previous declaration of 'Enum'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:78:6: Context: Previous declaration of 'Enum'. // enum Enum { // ^^^^ // diff --git a/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.outline.expect b/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.outline.expect index 38353db11644..2a6649c27cb9 100644 --- a/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.outline.expect @@ -42,14 +42,14 @@ library; // pkg/front_end/testcases/general/duplicated_declarations_part.dart:13:9: Error: 'Typedef' is already declared in this scope. // typedef Typedef = void Function(); // ^^^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:15:9: Context: Previous declaration of 'Typedef'. -// typedef Typedef = Object Function(); +// pkg/front_end/testcases/general/duplicated_declarations.dart:13:9: Context: Previous declaration of 'Typedef'. +// typedef Typedef = void Function(); // ^^^^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:15:9: Error: 'Typedef' is already declared in this scope. // typedef Typedef = Object Function(); // ^^^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:13:9: Context: Previous declaration of 'Typedef'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:13:9: Context: Previous declaration of 'Typedef'. // typedef Typedef = void Function(); // ^^^^^^^ // @@ -63,14 +63,14 @@ library; // pkg/front_end/testcases/general/duplicated_declarations_part.dart:19:14: Error: 'OldTypedef' is already declared in this scope. // typedef void OldTypedef(); // ^^^^^^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:21:16: Context: Previous declaration of 'OldTypedef'. -// typedef Object OldTypedef(); -// ^^^^^^^^^^ +// pkg/front_end/testcases/general/duplicated_declarations.dart:19:14: Context: Previous declaration of 'OldTypedef'. +// typedef void OldTypedef(); +// ^^^^^^^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:21:16: Error: 'OldTypedef' is already declared in this scope. // typedef Object OldTypedef(); // ^^^^^^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:19:14: Context: Previous declaration of 'OldTypedef'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:19:14: Context: Previous declaration of 'OldTypedef'. // typedef void OldTypedef(); // ^^^^^^^^^^ // @@ -84,22 +84,22 @@ library; // pkg/front_end/testcases/general/duplicated_declarations_part.dart:23:5: Error: 'field' is already declared in this scope. // var field = "3rd"; // ^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:25:5: Context: Previous declaration of 'field'. -// var field = "2nd"; +// pkg/front_end/testcases/general/duplicated_declarations.dart:23:5: Context: Previous declaration of 'field'. +// var field = "1st"; // ^^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:25:5: Error: 'field' is already declared in this scope. // var field = 4; // ^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:23:5: Context: Previous declaration of 'field'. -// var field = "3rd"; +// pkg/front_end/testcases/general/duplicated_declarations.dart:23:5: Context: Previous declaration of 'field'. +// var field = "1st"; // ^^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:27:5: Error: 'field' is already declared in this scope. // var field = 5.0; // ^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:25:5: Context: Previous declaration of 'field'. -// var field = 4; +// pkg/front_end/testcases/general/duplicated_declarations.dart:23:5: Context: Previous declaration of 'field'. +// var field = "1st"; // ^^^^^ // // pkg/front_end/testcases/general/duplicated_declarations.dart:31:1: Error: 'main' is already declared in this scope. @@ -112,21 +112,21 @@ library; // pkg/front_end/testcases/general/duplicated_declarations_part.dart:29:1: Error: 'main' is already declared in this scope. // main() { // ^^^^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:31:1: Context: Previous declaration of 'main'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:27:1: Context: Previous declaration of 'main'. // main() { // ^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:33:1: Error: 'main' is already declared in this scope. // main() { // ^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:29:1: Context: Previous declaration of 'main'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:27:1: Context: Previous declaration of 'main'. // main() { // ^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:37:1: Error: 'main' is already declared in this scope. // main() { // ^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:33:1: Context: Previous declaration of 'main'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:27:1: Context: Previous declaration of 'main'. // main() { // ^^^^ // @@ -140,21 +140,21 @@ library; // pkg/front_end/testcases/general/duplicated_declarations_part.dart:41:7: Error: 'C' is already declared in this scope. // class C { // ^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:74:7: Context: Previous declaration of 'C'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:43:7: Context: Previous declaration of 'C'. // class C { // ^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:67:7: Error: 'C' is already declared in this scope. // class C { // ^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:41:7: Context: Previous declaration of 'C'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:43:7: Context: Previous declaration of 'C'. // class C { // ^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:71:7: Error: 'C' is already declared in this scope. // class C { // ^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:67:7: Context: Previous declaration of 'C'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:43:7: Context: Previous declaration of 'C'. // class C { // ^ // @@ -168,21 +168,21 @@ library; // pkg/front_end/testcases/general/duplicated_declarations_part.dart:75:6: Error: 'Enum' is already declared in this scope. // enum Enum { // ^^^^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:85:6: Context: Previous declaration of 'Enum'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:78:6: Context: Previous declaration of 'Enum'. // enum Enum { // ^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:82:6: Error: 'Enum' is already declared in this scope. // enum Enum { // ^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:75:6: Context: Previous declaration of 'Enum'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:78:6: Context: Previous declaration of 'Enum'. // enum Enum { // ^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:88:6: Error: 'Enum' is already declared in this scope. // enum Enum { // ^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:82:6: Context: Previous declaration of 'Enum'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:78:6: Context: Previous declaration of 'Enum'. // enum Enum { // ^^^^ // diff --git a/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.transformed.expect b/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.transformed.expect index 5c9390951201..590a7fc916d7 100644 --- a/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.transformed.expect @@ -42,14 +42,14 @@ library; // pkg/front_end/testcases/general/duplicated_declarations_part.dart:13:9: Error: 'Typedef' is already declared in this scope. // typedef Typedef = void Function(); // ^^^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:15:9: Context: Previous declaration of 'Typedef'. -// typedef Typedef = Object Function(); +// pkg/front_end/testcases/general/duplicated_declarations.dart:13:9: Context: Previous declaration of 'Typedef'. +// typedef Typedef = void Function(); // ^^^^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:15:9: Error: 'Typedef' is already declared in this scope. // typedef Typedef = Object Function(); // ^^^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:13:9: Context: Previous declaration of 'Typedef'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:13:9: Context: Previous declaration of 'Typedef'. // typedef Typedef = void Function(); // ^^^^^^^ // @@ -63,14 +63,14 @@ library; // pkg/front_end/testcases/general/duplicated_declarations_part.dart:19:14: Error: 'OldTypedef' is already declared in this scope. // typedef void OldTypedef(); // ^^^^^^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:21:16: Context: Previous declaration of 'OldTypedef'. -// typedef Object OldTypedef(); -// ^^^^^^^^^^ +// pkg/front_end/testcases/general/duplicated_declarations.dart:19:14: Context: Previous declaration of 'OldTypedef'. +// typedef void OldTypedef(); +// ^^^^^^^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:21:16: Error: 'OldTypedef' is already declared in this scope. // typedef Object OldTypedef(); // ^^^^^^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:19:14: Context: Previous declaration of 'OldTypedef'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:19:14: Context: Previous declaration of 'OldTypedef'. // typedef void OldTypedef(); // ^^^^^^^^^^ // @@ -84,22 +84,22 @@ library; // pkg/front_end/testcases/general/duplicated_declarations_part.dart:23:5: Error: 'field' is already declared in this scope. // var field = "3rd"; // ^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:25:5: Context: Previous declaration of 'field'. -// var field = "2nd"; +// pkg/front_end/testcases/general/duplicated_declarations.dart:23:5: Context: Previous declaration of 'field'. +// var field = "1st"; // ^^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:25:5: Error: 'field' is already declared in this scope. // var field = 4; // ^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:23:5: Context: Previous declaration of 'field'. -// var field = "3rd"; +// pkg/front_end/testcases/general/duplicated_declarations.dart:23:5: Context: Previous declaration of 'field'. +// var field = "1st"; // ^^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:27:5: Error: 'field' is already declared in this scope. // var field = 5.0; // ^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:25:5: Context: Previous declaration of 'field'. -// var field = 4; +// pkg/front_end/testcases/general/duplicated_declarations.dart:23:5: Context: Previous declaration of 'field'. +// var field = "1st"; // ^^^^^ // // pkg/front_end/testcases/general/duplicated_declarations.dart:31:1: Error: 'main' is already declared in this scope. @@ -112,21 +112,21 @@ library; // pkg/front_end/testcases/general/duplicated_declarations_part.dart:29:1: Error: 'main' is already declared in this scope. // main() { // ^^^^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:31:1: Context: Previous declaration of 'main'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:27:1: Context: Previous declaration of 'main'. // main() { // ^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:33:1: Error: 'main' is already declared in this scope. // main() { // ^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:29:1: Context: Previous declaration of 'main'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:27:1: Context: Previous declaration of 'main'. // main() { // ^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:37:1: Error: 'main' is already declared in this scope. // main() { // ^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:33:1: Context: Previous declaration of 'main'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:27:1: Context: Previous declaration of 'main'. // main() { // ^^^^ // @@ -140,21 +140,21 @@ library; // pkg/front_end/testcases/general/duplicated_declarations_part.dart:41:7: Error: 'C' is already declared in this scope. // class C { // ^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:74:7: Context: Previous declaration of 'C'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:43:7: Context: Previous declaration of 'C'. // class C { // ^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:67:7: Error: 'C' is already declared in this scope. // class C { // ^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:41:7: Context: Previous declaration of 'C'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:43:7: Context: Previous declaration of 'C'. // class C { // ^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:71:7: Error: 'C' is already declared in this scope. // class C { // ^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:67:7: Context: Previous declaration of 'C'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:43:7: Context: Previous declaration of 'C'. // class C { // ^ // @@ -168,21 +168,21 @@ library; // pkg/front_end/testcases/general/duplicated_declarations_part.dart:75:6: Error: 'Enum' is already declared in this scope. // enum Enum { // ^^^^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:85:6: Context: Previous declaration of 'Enum'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:78:6: Context: Previous declaration of 'Enum'. // enum Enum { // ^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:82:6: Error: 'Enum' is already declared in this scope. // enum Enum { // ^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:75:6: Context: Previous declaration of 'Enum'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:78:6: Context: Previous declaration of 'Enum'. // enum Enum { // ^^^^ // // pkg/front_end/testcases/general/duplicated_declarations_part.dart:88:6: Error: 'Enum' is already declared in this scope. // enum Enum { // ^^^^ -// pkg/front_end/testcases/general/duplicated_declarations_part.dart:82:6: Context: Previous declaration of 'Enum'. +// pkg/front_end/testcases/general/duplicated_declarations.dart:78:6: Context: Previous declaration of 'Enum'. // enum Enum { // ^^^^ // diff --git a/pkg/front_end/testcases/general/error_recovery/class_header.dart.strong.expect b/pkg/front_end/testcases/general/error_recovery/class_header.dart.strong.expect index 4e1f874083f9..548ffbdb4a26 100644 --- a/pkg/front_end/testcases/general/error_recovery/class_header.dart.strong.expect +++ b/pkg/front_end/testcases/general/error_recovery/class_header.dart.strong.expect @@ -1094,79 +1094,79 @@ library; // pkg/front_end/testcases/general/error_recovery/class_header.dart:36:25: Error: 'with' is already declared in this scope. // class N3 = implements D with C extends B; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:35: Context: Previous declaration of 'with'. -// class N2 = implements D extends B with C; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:41:34: Error: 'with' is already declared in this scope. // class N8 = B with C implements D with C; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:36:25: Context: Previous declaration of 'with'. -// class N3 = implements D with C extends B; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:42:27: Error: 'with' is already declared in this scope. // class N9 = B implements D with C extends B; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:41:34: Context: Previous declaration of 'with'. -// class N8 = B with C implements D with C; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:43:28: Error: 'with' is already declared in this scope. // class N10 = B implements D with C implements D; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:42:27: Context: Previous declaration of 'with'. -// class N9 = B implements D with C extends B; +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; // ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:44:28: Error: 'with' is already declared in this scope. // class N11 = B implements D with C with C; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:43:28: Context: Previous declaration of 'with'. -// class N10 = B implements D with C implements D; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:44:35: Error: 'with' is already declared in this scope. // class N11 = B implements D with C with C; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:44:28: Context: Previous declaration of 'with'. -// class N11 = B implements D with C with C; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:45:25: Error: 'with' is already declared in this scope. // class N12 = B extends B with C implements D; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:44:35: Context: Previous declaration of 'with'. -// class N11 = B implements D with C with C; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:46:22: Error: 'with' is already declared in this scope. // class N13 = B with C with C implements D; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:45:25: Context: Previous declaration of 'with'. -// class N12 = B extends B with C implements D; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:50:26: Error: 'with' is already declared in this scope. // class N17 = implements D with C; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:46:22: Context: Previous declaration of 'with'. -// class N13 = B with C with C implements D; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:58:20: Error: 'with' is already declared in this scope. // class N25 = with C with; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:50:26: Context: Previous declaration of 'with'. -// class N17 = implements D with C; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:30: Error: 'with' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:58:20: Context: Previous declaration of 'with'. -// class N25 = with C with; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:35:40: Error: 'C' is already declared in this scope. // class N2 = implements D extends B with C; @@ -1178,51 +1178,51 @@ library; // pkg/front_end/testcases/general/error_recovery/class_header.dart:36:30: Error: 'C' is already declared in this scope. // class N3 = implements D with C extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:40: Context: Previous declaration of 'C'. -// class N2 = implements D extends B with C; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:41:39: Error: 'C' is already declared in this scope. // class N8 = B with C implements D with C; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:36:30: Context: Previous declaration of 'C'. -// class N3 = implements D with C extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:42:32: Error: 'C' is already declared in this scope. // class N9 = B implements D with C extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:41:39: Context: Previous declaration of 'C'. -// class N8 = B with C implements D with C; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:44:33: Error: 'C' is already declared in this scope. // class N11 = B implements D with C with C; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:42:32: Context: Previous declaration of 'C'. -// class N9 = B implements D with C extends B; +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; // ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:44:40: Error: 'C' is already declared in this scope. // class N11 = B implements D with C with C; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:44:33: Context: Previous declaration of 'C'. -// class N11 = B implements D with C with C; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:50:31: Error: 'C' is already declared in this scope. // class N17 = implements D with C; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:44:40: Context: Previous declaration of 'C'. -// class N11 = B implements D with C with C; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:90:7: Error: 'C' is already declared in this scope. // class C {} // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:50:31: Context: Previous declaration of 'C'. -// class N17 = implements D with C; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:36:32: Error: 'extends' is already declared in this scope. // class N3 = implements D with C extends B; @@ -1234,72 +1234,72 @@ library; // pkg/front_end/testcases/general/error_recovery/class_header.dart:37:32: Error: 'extends' is already declared in this scope. // class N4 = with C implements D extends B; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:36:32: Context: Previous declaration of 'extends'. -// class N3 = implements D with C extends B; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:38:19: Error: 'extends' is already declared in this scope. // class N5 = with C extends B implements D; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:37:32: Context: Previous declaration of 'extends'. -// class N4 = with C implements D extends B; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:39:34: Error: 'extends' is already declared in this scope. // class N6 = B with C implements D extends B; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:19: Context: Previous declaration of 'extends'. -// class N5 = with C extends B implements D; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:42:34: Error: 'extends' is already declared in this scope. // class N9 = B implements D with C extends B; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:39:34: Context: Previous declaration of 'extends'. -// class N6 = B with C implements D extends B; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:45:15: Error: 'extends' is already declared in this scope. // class N12 = B extends B with C implements D; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:42:34: Context: Previous declaration of 'extends'. -// class N9 = B implements D with C extends B; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:48:20: Error: 'extends' is already declared in this scope. // class N15 = with D extends B; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:45:15: Context: Previous declaration of 'extends'. -// class N12 = B extends B with C implements D; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:49:26: Error: 'extends' is already declared in this scope. // class N16 = implements D extends B; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:48:20: Context: Previous declaration of 'extends'. -// class N15 = with D extends B; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:57:15: Error: 'extends' is already declared in this scope. // class N24 = B extends; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:49:26: Context: Previous declaration of 'extends'. -// class N16 = implements D extends B; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:10: Error: 'extends' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:57:15: Context: Previous declaration of 'extends'. -// class N24 = B extends; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:20: Error: 'extends' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:73:10: Context: Previous declaration of 'extends'. -// enum E12 extends B extends B with C implements D { element } -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:36:40: Error: 'B' is already declared in this scope. // class N3 = implements D with C extends B; @@ -1311,65 +1311,65 @@ library; // pkg/front_end/testcases/general/error_recovery/class_header.dart:37:40: Error: 'B' is already declared in this scope. // class N4 = with C implements D extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:36:40: Context: Previous declaration of 'B'. -// class N3 = implements D with C extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:39:42: Error: 'B' is already declared in this scope. // class N6 = B with C implements D extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:37:40: Context: Previous declaration of 'B'. -// class N4 = with C implements D extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:42:42: Error: 'B' is already declared in this scope. // class N9 = B implements D with C extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:39:42: Context: Previous declaration of 'B'. -// class N6 = B with C implements D extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:45:23: Error: 'B' is already declared in this scope. // class N12 = B extends B with C implements D; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:42:42: Context: Previous declaration of 'B'. -// class N9 = B implements D with C extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:48:28: Error: 'B' is already declared in this scope. // class N15 = with D extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:45:23: Context: Previous declaration of 'B'. -// class N12 = B extends B with C implements D; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:49:34: Error: 'B' is already declared in this scope. // class N16 = implements D extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:48:28: Context: Previous declaration of 'B'. -// class N15 = with D extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:18: Error: 'B' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:49:34: Context: Previous declaration of 'B'. -// class N16 = implements D extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:28: Error: 'B' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:73:18: Context: Previous declaration of 'B'. -// enum E12 extends B extends B with C implements D { element } -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:89:7: Error: 'B' is already declared in this scope. // class B {} // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:73:28: Context: Previous declaration of 'B'. -// enum E12 extends B extends B with C implements D { element } -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:40:34: Error: 'implements' is already declared in this scope. // class N7 = B with C implements D implements D; @@ -1381,37 +1381,37 @@ library; // pkg/front_end/testcases/general/error_recovery/class_header.dart:43:35: Error: 'implements' is already declared in this scope. // class N10 = B implements D with C implements D; // ^^^^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:40:34: Context: Previous declaration of 'implements'. -// class N7 = B with C implements D implements D; -// ^^^^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:29: Context: Previous declaration of 'implements'. +// class N5 = with C extends B implements D; +// ^^^^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:45:32: Error: 'implements' is already declared in this scope. // class N12 = B extends B with C implements D; // ^^^^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:43:35: Context: Previous declaration of 'implements'. -// class N10 = B implements D with C implements D; -// ^^^^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:29: Context: Previous declaration of 'implements'. +// class N5 = with C extends B implements D; +// ^^^^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:46:29: Error: 'implements' is already declared in this scope. // class N13 = B with C with C implements D; // ^^^^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:45:32: Context: Previous declaration of 'implements'. -// class N12 = B extends B with C implements D; -// ^^^^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:29: Context: Previous declaration of 'implements'. +// class N5 = with C extends B implements D; +// ^^^^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:47:35: Error: 'implements' is already declared in this scope. // class N14 = B with C implements D implements D; // ^^^^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:46:29: Context: Previous declaration of 'implements'. -// class N13 = B with C with C implements D; +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:29: Context: Previous declaration of 'implements'. +// class N5 = with C extends B implements D; // ^^^^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:37: Error: 'implements' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^^^^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:47:35: Context: Previous declaration of 'implements'. -// class N14 = B with C implements D implements D; -// ^^^^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:29: Context: Previous declaration of 'implements'. +// class N5 = with C extends B implements D; +// ^^^^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:40:45: Error: 'D' is already declared in this scope. // class N7 = B with C implements D implements D; @@ -1423,44 +1423,44 @@ library; // pkg/front_end/testcases/general/error_recovery/class_header.dart:43:46: Error: 'D' is already declared in this scope. // class N10 = B implements D with C implements D; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:40:45: Context: Previous declaration of 'D'. -// class N7 = B with C implements D implements D; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:40: Context: Previous declaration of 'D'. +// class N5 = with C extends B implements D; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:45:43: Error: 'D' is already declared in this scope. // class N12 = B extends B with C implements D; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:43:46: Context: Previous declaration of 'D'. -// class N10 = B implements D with C implements D; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:40: Context: Previous declaration of 'D'. +// class N5 = with C extends B implements D; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:46:40: Error: 'D' is already declared in this scope. // class N13 = B with C with C implements D; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:45:43: Context: Previous declaration of 'D'. -// class N12 = B extends B with C implements D; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:40: Context: Previous declaration of 'D'. +// class N5 = with C extends B implements D; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:47:46: Error: 'D' is already declared in this scope. // class N14 = B with C implements D implements D; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:46:40: Context: Previous declaration of 'D'. -// class N13 = B with C with C implements D; +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:40: Context: Previous declaration of 'D'. +// class N5 = with C extends B implements D; // ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:48: Error: 'D' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:47:46: Context: Previous declaration of 'D'. -// class N14 = B with C implements D implements D; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:40: Context: Previous declaration of 'D'. +// class N5 = with C extends B implements D; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:91:7: Error: 'D' is already declared in this scope. // class D {} // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:73:48: Context: Previous declaration of 'D'. -// enum E12 extends B extends B with C implements D { element } -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:40: Context: Previous declaration of 'D'. +// class N5 = with C extends B implements D; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:38:27: Error: 'B' isn't a type. // class N5 = with C extends B implements D; diff --git a/pkg/front_end/testcases/general/error_recovery/class_header.dart.strong.modular.expect b/pkg/front_end/testcases/general/error_recovery/class_header.dart.strong.modular.expect index 4e1f874083f9..548ffbdb4a26 100644 --- a/pkg/front_end/testcases/general/error_recovery/class_header.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/error_recovery/class_header.dart.strong.modular.expect @@ -1094,79 +1094,79 @@ library; // pkg/front_end/testcases/general/error_recovery/class_header.dart:36:25: Error: 'with' is already declared in this scope. // class N3 = implements D with C extends B; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:35: Context: Previous declaration of 'with'. -// class N2 = implements D extends B with C; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:41:34: Error: 'with' is already declared in this scope. // class N8 = B with C implements D with C; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:36:25: Context: Previous declaration of 'with'. -// class N3 = implements D with C extends B; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:42:27: Error: 'with' is already declared in this scope. // class N9 = B implements D with C extends B; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:41:34: Context: Previous declaration of 'with'. -// class N8 = B with C implements D with C; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:43:28: Error: 'with' is already declared in this scope. // class N10 = B implements D with C implements D; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:42:27: Context: Previous declaration of 'with'. -// class N9 = B implements D with C extends B; +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; // ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:44:28: Error: 'with' is already declared in this scope. // class N11 = B implements D with C with C; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:43:28: Context: Previous declaration of 'with'. -// class N10 = B implements D with C implements D; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:44:35: Error: 'with' is already declared in this scope. // class N11 = B implements D with C with C; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:44:28: Context: Previous declaration of 'with'. -// class N11 = B implements D with C with C; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:45:25: Error: 'with' is already declared in this scope. // class N12 = B extends B with C implements D; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:44:35: Context: Previous declaration of 'with'. -// class N11 = B implements D with C with C; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:46:22: Error: 'with' is already declared in this scope. // class N13 = B with C with C implements D; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:45:25: Context: Previous declaration of 'with'. -// class N12 = B extends B with C implements D; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:50:26: Error: 'with' is already declared in this scope. // class N17 = implements D with C; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:46:22: Context: Previous declaration of 'with'. -// class N13 = B with C with C implements D; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:58:20: Error: 'with' is already declared in this scope. // class N25 = with C with; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:50:26: Context: Previous declaration of 'with'. -// class N17 = implements D with C; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:30: Error: 'with' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:58:20: Context: Previous declaration of 'with'. -// class N25 = with C with; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:35:40: Error: 'C' is already declared in this scope. // class N2 = implements D extends B with C; @@ -1178,51 +1178,51 @@ library; // pkg/front_end/testcases/general/error_recovery/class_header.dart:36:30: Error: 'C' is already declared in this scope. // class N3 = implements D with C extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:40: Context: Previous declaration of 'C'. -// class N2 = implements D extends B with C; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:41:39: Error: 'C' is already declared in this scope. // class N8 = B with C implements D with C; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:36:30: Context: Previous declaration of 'C'. -// class N3 = implements D with C extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:42:32: Error: 'C' is already declared in this scope. // class N9 = B implements D with C extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:41:39: Context: Previous declaration of 'C'. -// class N8 = B with C implements D with C; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:44:33: Error: 'C' is already declared in this scope. // class N11 = B implements D with C with C; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:42:32: Context: Previous declaration of 'C'. -// class N9 = B implements D with C extends B; +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; // ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:44:40: Error: 'C' is already declared in this scope. // class N11 = B implements D with C with C; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:44:33: Context: Previous declaration of 'C'. -// class N11 = B implements D with C with C; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:50:31: Error: 'C' is already declared in this scope. // class N17 = implements D with C; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:44:40: Context: Previous declaration of 'C'. -// class N11 = B implements D with C with C; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:90:7: Error: 'C' is already declared in this scope. // class C {} // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:50:31: Context: Previous declaration of 'C'. -// class N17 = implements D with C; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:36:32: Error: 'extends' is already declared in this scope. // class N3 = implements D with C extends B; @@ -1234,72 +1234,72 @@ library; // pkg/front_end/testcases/general/error_recovery/class_header.dart:37:32: Error: 'extends' is already declared in this scope. // class N4 = with C implements D extends B; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:36:32: Context: Previous declaration of 'extends'. -// class N3 = implements D with C extends B; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:38:19: Error: 'extends' is already declared in this scope. // class N5 = with C extends B implements D; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:37:32: Context: Previous declaration of 'extends'. -// class N4 = with C implements D extends B; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:39:34: Error: 'extends' is already declared in this scope. // class N6 = B with C implements D extends B; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:19: Context: Previous declaration of 'extends'. -// class N5 = with C extends B implements D; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:42:34: Error: 'extends' is already declared in this scope. // class N9 = B implements D with C extends B; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:39:34: Context: Previous declaration of 'extends'. -// class N6 = B with C implements D extends B; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:45:15: Error: 'extends' is already declared in this scope. // class N12 = B extends B with C implements D; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:42:34: Context: Previous declaration of 'extends'. -// class N9 = B implements D with C extends B; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:48:20: Error: 'extends' is already declared in this scope. // class N15 = with D extends B; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:45:15: Context: Previous declaration of 'extends'. -// class N12 = B extends B with C implements D; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:49:26: Error: 'extends' is already declared in this scope. // class N16 = implements D extends B; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:48:20: Context: Previous declaration of 'extends'. -// class N15 = with D extends B; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:57:15: Error: 'extends' is already declared in this scope. // class N24 = B extends; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:49:26: Context: Previous declaration of 'extends'. -// class N16 = implements D extends B; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:10: Error: 'extends' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:57:15: Context: Previous declaration of 'extends'. -// class N24 = B extends; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:20: Error: 'extends' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:73:10: Context: Previous declaration of 'extends'. -// enum E12 extends B extends B with C implements D { element } -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:36:40: Error: 'B' is already declared in this scope. // class N3 = implements D with C extends B; @@ -1311,65 +1311,65 @@ library; // pkg/front_end/testcases/general/error_recovery/class_header.dart:37:40: Error: 'B' is already declared in this scope. // class N4 = with C implements D extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:36:40: Context: Previous declaration of 'B'. -// class N3 = implements D with C extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:39:42: Error: 'B' is already declared in this scope. // class N6 = B with C implements D extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:37:40: Context: Previous declaration of 'B'. -// class N4 = with C implements D extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:42:42: Error: 'B' is already declared in this scope. // class N9 = B implements D with C extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:39:42: Context: Previous declaration of 'B'. -// class N6 = B with C implements D extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:45:23: Error: 'B' is already declared in this scope. // class N12 = B extends B with C implements D; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:42:42: Context: Previous declaration of 'B'. -// class N9 = B implements D with C extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:48:28: Error: 'B' is already declared in this scope. // class N15 = with D extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:45:23: Context: Previous declaration of 'B'. -// class N12 = B extends B with C implements D; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:49:34: Error: 'B' is already declared in this scope. // class N16 = implements D extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:48:28: Context: Previous declaration of 'B'. -// class N15 = with D extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:18: Error: 'B' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:49:34: Context: Previous declaration of 'B'. -// class N16 = implements D extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:28: Error: 'B' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:73:18: Context: Previous declaration of 'B'. -// enum E12 extends B extends B with C implements D { element } -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:89:7: Error: 'B' is already declared in this scope. // class B {} // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:73:28: Context: Previous declaration of 'B'. -// enum E12 extends B extends B with C implements D { element } -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:40:34: Error: 'implements' is already declared in this scope. // class N7 = B with C implements D implements D; @@ -1381,37 +1381,37 @@ library; // pkg/front_end/testcases/general/error_recovery/class_header.dart:43:35: Error: 'implements' is already declared in this scope. // class N10 = B implements D with C implements D; // ^^^^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:40:34: Context: Previous declaration of 'implements'. -// class N7 = B with C implements D implements D; -// ^^^^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:29: Context: Previous declaration of 'implements'. +// class N5 = with C extends B implements D; +// ^^^^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:45:32: Error: 'implements' is already declared in this scope. // class N12 = B extends B with C implements D; // ^^^^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:43:35: Context: Previous declaration of 'implements'. -// class N10 = B implements D with C implements D; -// ^^^^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:29: Context: Previous declaration of 'implements'. +// class N5 = with C extends B implements D; +// ^^^^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:46:29: Error: 'implements' is already declared in this scope. // class N13 = B with C with C implements D; // ^^^^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:45:32: Context: Previous declaration of 'implements'. -// class N12 = B extends B with C implements D; -// ^^^^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:29: Context: Previous declaration of 'implements'. +// class N5 = with C extends B implements D; +// ^^^^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:47:35: Error: 'implements' is already declared in this scope. // class N14 = B with C implements D implements D; // ^^^^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:46:29: Context: Previous declaration of 'implements'. -// class N13 = B with C with C implements D; +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:29: Context: Previous declaration of 'implements'. +// class N5 = with C extends B implements D; // ^^^^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:37: Error: 'implements' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^^^^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:47:35: Context: Previous declaration of 'implements'. -// class N14 = B with C implements D implements D; -// ^^^^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:29: Context: Previous declaration of 'implements'. +// class N5 = with C extends B implements D; +// ^^^^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:40:45: Error: 'D' is already declared in this scope. // class N7 = B with C implements D implements D; @@ -1423,44 +1423,44 @@ library; // pkg/front_end/testcases/general/error_recovery/class_header.dart:43:46: Error: 'D' is already declared in this scope. // class N10 = B implements D with C implements D; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:40:45: Context: Previous declaration of 'D'. -// class N7 = B with C implements D implements D; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:40: Context: Previous declaration of 'D'. +// class N5 = with C extends B implements D; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:45:43: Error: 'D' is already declared in this scope. // class N12 = B extends B with C implements D; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:43:46: Context: Previous declaration of 'D'. -// class N10 = B implements D with C implements D; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:40: Context: Previous declaration of 'D'. +// class N5 = with C extends B implements D; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:46:40: Error: 'D' is already declared in this scope. // class N13 = B with C with C implements D; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:45:43: Context: Previous declaration of 'D'. -// class N12 = B extends B with C implements D; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:40: Context: Previous declaration of 'D'. +// class N5 = with C extends B implements D; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:47:46: Error: 'D' is already declared in this scope. // class N14 = B with C implements D implements D; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:46:40: Context: Previous declaration of 'D'. -// class N13 = B with C with C implements D; +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:40: Context: Previous declaration of 'D'. +// class N5 = with C extends B implements D; // ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:48: Error: 'D' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:47:46: Context: Previous declaration of 'D'. -// class N14 = B with C implements D implements D; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:40: Context: Previous declaration of 'D'. +// class N5 = with C extends B implements D; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:91:7: Error: 'D' is already declared in this scope. // class D {} // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:73:48: Context: Previous declaration of 'D'. -// enum E12 extends B extends B with C implements D { element } -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:40: Context: Previous declaration of 'D'. +// class N5 = with C extends B implements D; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:38:27: Error: 'B' isn't a type. // class N5 = with C extends B implements D; diff --git a/pkg/front_end/testcases/general/error_recovery/class_header.dart.strong.outline.expect b/pkg/front_end/testcases/general/error_recovery/class_header.dart.strong.outline.expect index 0c22032cc1d5..6ab98dcab6d9 100644 --- a/pkg/front_end/testcases/general/error_recovery/class_header.dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/error_recovery/class_header.dart.strong.outline.expect @@ -1094,79 +1094,79 @@ library; // pkg/front_end/testcases/general/error_recovery/class_header.dart:36:25: Error: 'with' is already declared in this scope. // class N3 = implements D with C extends B; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:35: Context: Previous declaration of 'with'. -// class N2 = implements D extends B with C; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:41:34: Error: 'with' is already declared in this scope. // class N8 = B with C implements D with C; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:36:25: Context: Previous declaration of 'with'. -// class N3 = implements D with C extends B; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:42:27: Error: 'with' is already declared in this scope. // class N9 = B implements D with C extends B; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:41:34: Context: Previous declaration of 'with'. -// class N8 = B with C implements D with C; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:43:28: Error: 'with' is already declared in this scope. // class N10 = B implements D with C implements D; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:42:27: Context: Previous declaration of 'with'. -// class N9 = B implements D with C extends B; +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; // ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:44:28: Error: 'with' is already declared in this scope. // class N11 = B implements D with C with C; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:43:28: Context: Previous declaration of 'with'. -// class N10 = B implements D with C implements D; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:44:35: Error: 'with' is already declared in this scope. // class N11 = B implements D with C with C; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:44:28: Context: Previous declaration of 'with'. -// class N11 = B implements D with C with C; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:45:25: Error: 'with' is already declared in this scope. // class N12 = B extends B with C implements D; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:44:35: Context: Previous declaration of 'with'. -// class N11 = B implements D with C with C; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:46:22: Error: 'with' is already declared in this scope. // class N13 = B with C with C implements D; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:45:25: Context: Previous declaration of 'with'. -// class N12 = B extends B with C implements D; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:50:26: Error: 'with' is already declared in this scope. // class N17 = implements D with C; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:46:22: Context: Previous declaration of 'with'. -// class N13 = B with C with C implements D; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:58:20: Error: 'with' is already declared in this scope. // class N25 = with C with; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:50:26: Context: Previous declaration of 'with'. -// class N17 = implements D with C; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:30: Error: 'with' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:58:20: Context: Previous declaration of 'with'. -// class N25 = with C with; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:35:40: Error: 'C' is already declared in this scope. // class N2 = implements D extends B with C; @@ -1178,51 +1178,51 @@ library; // pkg/front_end/testcases/general/error_recovery/class_header.dart:36:30: Error: 'C' is already declared in this scope. // class N3 = implements D with C extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:40: Context: Previous declaration of 'C'. -// class N2 = implements D extends B with C; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:41:39: Error: 'C' is already declared in this scope. // class N8 = B with C implements D with C; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:36:30: Context: Previous declaration of 'C'. -// class N3 = implements D with C extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:42:32: Error: 'C' is already declared in this scope. // class N9 = B implements D with C extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:41:39: Context: Previous declaration of 'C'. -// class N8 = B with C implements D with C; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:44:33: Error: 'C' is already declared in this scope. // class N11 = B implements D with C with C; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:42:32: Context: Previous declaration of 'C'. -// class N9 = B implements D with C extends B; +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; // ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:44:40: Error: 'C' is already declared in this scope. // class N11 = B implements D with C with C; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:44:33: Context: Previous declaration of 'C'. -// class N11 = B implements D with C with C; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:50:31: Error: 'C' is already declared in this scope. // class N17 = implements D with C; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:44:40: Context: Previous declaration of 'C'. -// class N11 = B implements D with C with C; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:90:7: Error: 'C' is already declared in this scope. // class C {} // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:50:31: Context: Previous declaration of 'C'. -// class N17 = implements D with C; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:36:32: Error: 'extends' is already declared in this scope. // class N3 = implements D with C extends B; @@ -1234,72 +1234,72 @@ library; // pkg/front_end/testcases/general/error_recovery/class_header.dart:37:32: Error: 'extends' is already declared in this scope. // class N4 = with C implements D extends B; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:36:32: Context: Previous declaration of 'extends'. -// class N3 = implements D with C extends B; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:38:19: Error: 'extends' is already declared in this scope. // class N5 = with C extends B implements D; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:37:32: Context: Previous declaration of 'extends'. -// class N4 = with C implements D extends B; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:39:34: Error: 'extends' is already declared in this scope. // class N6 = B with C implements D extends B; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:19: Context: Previous declaration of 'extends'. -// class N5 = with C extends B implements D; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:42:34: Error: 'extends' is already declared in this scope. // class N9 = B implements D with C extends B; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:39:34: Context: Previous declaration of 'extends'. -// class N6 = B with C implements D extends B; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:45:15: Error: 'extends' is already declared in this scope. // class N12 = B extends B with C implements D; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:42:34: Context: Previous declaration of 'extends'. -// class N9 = B implements D with C extends B; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:48:20: Error: 'extends' is already declared in this scope. // class N15 = with D extends B; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:45:15: Context: Previous declaration of 'extends'. -// class N12 = B extends B with C implements D; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:49:26: Error: 'extends' is already declared in this scope. // class N16 = implements D extends B; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:48:20: Context: Previous declaration of 'extends'. -// class N15 = with D extends B; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:57:15: Error: 'extends' is already declared in this scope. // class N24 = B extends; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:49:26: Context: Previous declaration of 'extends'. -// class N16 = implements D extends B; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:10: Error: 'extends' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:57:15: Context: Previous declaration of 'extends'. -// class N24 = B extends; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:20: Error: 'extends' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:73:10: Context: Previous declaration of 'extends'. -// enum E12 extends B extends B with C implements D { element } -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:36:40: Error: 'B' is already declared in this scope. // class N3 = implements D with C extends B; @@ -1311,65 +1311,65 @@ library; // pkg/front_end/testcases/general/error_recovery/class_header.dart:37:40: Error: 'B' is already declared in this scope. // class N4 = with C implements D extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:36:40: Context: Previous declaration of 'B'. -// class N3 = implements D with C extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:39:42: Error: 'B' is already declared in this scope. // class N6 = B with C implements D extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:37:40: Context: Previous declaration of 'B'. -// class N4 = with C implements D extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:42:42: Error: 'B' is already declared in this scope. // class N9 = B implements D with C extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:39:42: Context: Previous declaration of 'B'. -// class N6 = B with C implements D extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:45:23: Error: 'B' is already declared in this scope. // class N12 = B extends B with C implements D; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:42:42: Context: Previous declaration of 'B'. -// class N9 = B implements D with C extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:48:28: Error: 'B' is already declared in this scope. // class N15 = with D extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:45:23: Context: Previous declaration of 'B'. -// class N12 = B extends B with C implements D; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:49:34: Error: 'B' is already declared in this scope. // class N16 = implements D extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:48:28: Context: Previous declaration of 'B'. -// class N15 = with D extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:18: Error: 'B' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:49:34: Context: Previous declaration of 'B'. -// class N16 = implements D extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:28: Error: 'B' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:73:18: Context: Previous declaration of 'B'. -// enum E12 extends B extends B with C implements D { element } -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:89:7: Error: 'B' is already declared in this scope. // class B {} // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:73:28: Context: Previous declaration of 'B'. -// enum E12 extends B extends B with C implements D { element } -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:40:34: Error: 'implements' is already declared in this scope. // class N7 = B with C implements D implements D; @@ -1381,37 +1381,37 @@ library; // pkg/front_end/testcases/general/error_recovery/class_header.dart:43:35: Error: 'implements' is already declared in this scope. // class N10 = B implements D with C implements D; // ^^^^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:40:34: Context: Previous declaration of 'implements'. -// class N7 = B with C implements D implements D; -// ^^^^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:29: Context: Previous declaration of 'implements'. +// class N5 = with C extends B implements D; +// ^^^^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:45:32: Error: 'implements' is already declared in this scope. // class N12 = B extends B with C implements D; // ^^^^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:43:35: Context: Previous declaration of 'implements'. -// class N10 = B implements D with C implements D; -// ^^^^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:29: Context: Previous declaration of 'implements'. +// class N5 = with C extends B implements D; +// ^^^^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:46:29: Error: 'implements' is already declared in this scope. // class N13 = B with C with C implements D; // ^^^^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:45:32: Context: Previous declaration of 'implements'. -// class N12 = B extends B with C implements D; -// ^^^^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:29: Context: Previous declaration of 'implements'. +// class N5 = with C extends B implements D; +// ^^^^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:47:35: Error: 'implements' is already declared in this scope. // class N14 = B with C implements D implements D; // ^^^^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:46:29: Context: Previous declaration of 'implements'. -// class N13 = B with C with C implements D; +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:29: Context: Previous declaration of 'implements'. +// class N5 = with C extends B implements D; // ^^^^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:37: Error: 'implements' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^^^^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:47:35: Context: Previous declaration of 'implements'. -// class N14 = B with C implements D implements D; -// ^^^^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:29: Context: Previous declaration of 'implements'. +// class N5 = with C extends B implements D; +// ^^^^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:40:45: Error: 'D' is already declared in this scope. // class N7 = B with C implements D implements D; @@ -1423,44 +1423,44 @@ library; // pkg/front_end/testcases/general/error_recovery/class_header.dart:43:46: Error: 'D' is already declared in this scope. // class N10 = B implements D with C implements D; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:40:45: Context: Previous declaration of 'D'. -// class N7 = B with C implements D implements D; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:40: Context: Previous declaration of 'D'. +// class N5 = with C extends B implements D; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:45:43: Error: 'D' is already declared in this scope. // class N12 = B extends B with C implements D; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:43:46: Context: Previous declaration of 'D'. -// class N10 = B implements D with C implements D; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:40: Context: Previous declaration of 'D'. +// class N5 = with C extends B implements D; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:46:40: Error: 'D' is already declared in this scope. // class N13 = B with C with C implements D; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:45:43: Context: Previous declaration of 'D'. -// class N12 = B extends B with C implements D; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:40: Context: Previous declaration of 'D'. +// class N5 = with C extends B implements D; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:47:46: Error: 'D' is already declared in this scope. // class N14 = B with C implements D implements D; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:46:40: Context: Previous declaration of 'D'. -// class N13 = B with C with C implements D; +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:40: Context: Previous declaration of 'D'. +// class N5 = with C extends B implements D; // ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:48: Error: 'D' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:47:46: Context: Previous declaration of 'D'. -// class N14 = B with C implements D implements D; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:40: Context: Previous declaration of 'D'. +// class N5 = with C extends B implements D; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:91:7: Error: 'D' is already declared in this scope. // class D {} // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:73:48: Context: Previous declaration of 'D'. -// enum E12 extends B extends B with C implements D { element } -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:40: Context: Previous declaration of 'D'. +// class N5 = with C extends B implements D; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:38:27: Error: 'B' isn't a type. // class N5 = with C extends B implements D; diff --git a/pkg/front_end/testcases/general/error_recovery/class_header.dart.strong.transformed.expect b/pkg/front_end/testcases/general/error_recovery/class_header.dart.strong.transformed.expect index 4e1f874083f9..548ffbdb4a26 100644 --- a/pkg/front_end/testcases/general/error_recovery/class_header.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/error_recovery/class_header.dart.strong.transformed.expect @@ -1094,79 +1094,79 @@ library; // pkg/front_end/testcases/general/error_recovery/class_header.dart:36:25: Error: 'with' is already declared in this scope. // class N3 = implements D with C extends B; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:35: Context: Previous declaration of 'with'. -// class N2 = implements D extends B with C; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:41:34: Error: 'with' is already declared in this scope. // class N8 = B with C implements D with C; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:36:25: Context: Previous declaration of 'with'. -// class N3 = implements D with C extends B; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:42:27: Error: 'with' is already declared in this scope. // class N9 = B implements D with C extends B; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:41:34: Context: Previous declaration of 'with'. -// class N8 = B with C implements D with C; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:43:28: Error: 'with' is already declared in this scope. // class N10 = B implements D with C implements D; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:42:27: Context: Previous declaration of 'with'. -// class N9 = B implements D with C extends B; +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; // ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:44:28: Error: 'with' is already declared in this scope. // class N11 = B implements D with C with C; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:43:28: Context: Previous declaration of 'with'. -// class N10 = B implements D with C implements D; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:44:35: Error: 'with' is already declared in this scope. // class N11 = B implements D with C with C; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:44:28: Context: Previous declaration of 'with'. -// class N11 = B implements D with C with C; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:45:25: Error: 'with' is already declared in this scope. // class N12 = B extends B with C implements D; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:44:35: Context: Previous declaration of 'with'. -// class N11 = B implements D with C with C; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:46:22: Error: 'with' is already declared in this scope. // class N13 = B with C with C implements D; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:45:25: Context: Previous declaration of 'with'. -// class N12 = B extends B with C implements D; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:50:26: Error: 'with' is already declared in this scope. // class N17 = implements D with C; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:46:22: Context: Previous declaration of 'with'. -// class N13 = B with C with C implements D; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:58:20: Error: 'with' is already declared in this scope. // class N25 = with C with; // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:50:26: Context: Previous declaration of 'with'. -// class N17 = implements D with C; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:30: Error: 'with' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:58:20: Context: Previous declaration of 'with'. -// class N25 = with C with; -// ^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:27: Context: Previous declaration of 'with'. +// class N1 = B implements D with C; +// ^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:35:40: Error: 'C' is already declared in this scope. // class N2 = implements D extends B with C; @@ -1178,51 +1178,51 @@ library; // pkg/front_end/testcases/general/error_recovery/class_header.dart:36:30: Error: 'C' is already declared in this scope. // class N3 = implements D with C extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:40: Context: Previous declaration of 'C'. -// class N2 = implements D extends B with C; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:41:39: Error: 'C' is already declared in this scope. // class N8 = B with C implements D with C; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:36:30: Context: Previous declaration of 'C'. -// class N3 = implements D with C extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:42:32: Error: 'C' is already declared in this scope. // class N9 = B implements D with C extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:41:39: Context: Previous declaration of 'C'. -// class N8 = B with C implements D with C; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:44:33: Error: 'C' is already declared in this scope. // class N11 = B implements D with C with C; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:42:32: Context: Previous declaration of 'C'. -// class N9 = B implements D with C extends B; +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; // ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:44:40: Error: 'C' is already declared in this scope. // class N11 = B implements D with C with C; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:44:33: Context: Previous declaration of 'C'. -// class N11 = B implements D with C with C; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:50:31: Error: 'C' is already declared in this scope. // class N17 = implements D with C; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:44:40: Context: Previous declaration of 'C'. -// class N11 = B implements D with C with C; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:90:7: Error: 'C' is already declared in this scope. // class C {} // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:50:31: Context: Previous declaration of 'C'. -// class N17 = implements D with C; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:34:32: Context: Previous declaration of 'C'. +// class N1 = B implements D with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:36:32: Error: 'extends' is already declared in this scope. // class N3 = implements D with C extends B; @@ -1234,72 +1234,72 @@ library; // pkg/front_end/testcases/general/error_recovery/class_header.dart:37:32: Error: 'extends' is already declared in this scope. // class N4 = with C implements D extends B; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:36:32: Context: Previous declaration of 'extends'. -// class N3 = implements D with C extends B; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:38:19: Error: 'extends' is already declared in this scope. // class N5 = with C extends B implements D; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:37:32: Context: Previous declaration of 'extends'. -// class N4 = with C implements D extends B; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:39:34: Error: 'extends' is already declared in this scope. // class N6 = B with C implements D extends B; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:19: Context: Previous declaration of 'extends'. -// class N5 = with C extends B implements D; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:42:34: Error: 'extends' is already declared in this scope. // class N9 = B implements D with C extends B; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:39:34: Context: Previous declaration of 'extends'. -// class N6 = B with C implements D extends B; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:45:15: Error: 'extends' is already declared in this scope. // class N12 = B extends B with C implements D; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:42:34: Context: Previous declaration of 'extends'. -// class N9 = B implements D with C extends B; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:48:20: Error: 'extends' is already declared in this scope. // class N15 = with D extends B; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:45:15: Context: Previous declaration of 'extends'. -// class N12 = B extends B with C implements D; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:49:26: Error: 'extends' is already declared in this scope. // class N16 = implements D extends B; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:48:20: Context: Previous declaration of 'extends'. -// class N15 = with D extends B; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:57:15: Error: 'extends' is already declared in this scope. // class N24 = B extends; // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:49:26: Context: Previous declaration of 'extends'. -// class N16 = implements D extends B; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:10: Error: 'extends' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:57:15: Context: Previous declaration of 'extends'. -// class N24 = B extends; -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:20: Error: 'extends' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:73:10: Context: Previous declaration of 'extends'. -// enum E12 extends B extends B with C implements D { element } -// ^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:25: Context: Previous declaration of 'extends'. +// class N2 = implements D extends B with C; +// ^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:36:40: Error: 'B' is already declared in this scope. // class N3 = implements D with C extends B; @@ -1311,65 +1311,65 @@ library; // pkg/front_end/testcases/general/error_recovery/class_header.dart:37:40: Error: 'B' is already declared in this scope. // class N4 = with C implements D extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:36:40: Context: Previous declaration of 'B'. -// class N3 = implements D with C extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:39:42: Error: 'B' is already declared in this scope. // class N6 = B with C implements D extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:37:40: Context: Previous declaration of 'B'. -// class N4 = with C implements D extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:42:42: Error: 'B' is already declared in this scope. // class N9 = B implements D with C extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:39:42: Context: Previous declaration of 'B'. -// class N6 = B with C implements D extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:45:23: Error: 'B' is already declared in this scope. // class N12 = B extends B with C implements D; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:42:42: Context: Previous declaration of 'B'. -// class N9 = B implements D with C extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:48:28: Error: 'B' is already declared in this scope. // class N15 = with D extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:45:23: Context: Previous declaration of 'B'. -// class N12 = B extends B with C implements D; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:49:34: Error: 'B' is already declared in this scope. // class N16 = implements D extends B; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:48:28: Context: Previous declaration of 'B'. -// class N15 = with D extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:18: Error: 'B' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:49:34: Context: Previous declaration of 'B'. -// class N16 = implements D extends B; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:28: Error: 'B' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:73:18: Context: Previous declaration of 'B'. -// enum E12 extends B extends B with C implements D { element } -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:89:7: Error: 'B' is already declared in this scope. // class B {} // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:73:28: Context: Previous declaration of 'B'. -// enum E12 extends B extends B with C implements D { element } -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:35:33: Context: Previous declaration of 'B'. +// class N2 = implements D extends B with C; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:40:34: Error: 'implements' is already declared in this scope. // class N7 = B with C implements D implements D; @@ -1381,37 +1381,37 @@ library; // pkg/front_end/testcases/general/error_recovery/class_header.dart:43:35: Error: 'implements' is already declared in this scope. // class N10 = B implements D with C implements D; // ^^^^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:40:34: Context: Previous declaration of 'implements'. -// class N7 = B with C implements D implements D; -// ^^^^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:29: Context: Previous declaration of 'implements'. +// class N5 = with C extends B implements D; +// ^^^^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:45:32: Error: 'implements' is already declared in this scope. // class N12 = B extends B with C implements D; // ^^^^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:43:35: Context: Previous declaration of 'implements'. -// class N10 = B implements D with C implements D; -// ^^^^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:29: Context: Previous declaration of 'implements'. +// class N5 = with C extends B implements D; +// ^^^^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:46:29: Error: 'implements' is already declared in this scope. // class N13 = B with C with C implements D; // ^^^^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:45:32: Context: Previous declaration of 'implements'. -// class N12 = B extends B with C implements D; -// ^^^^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:29: Context: Previous declaration of 'implements'. +// class N5 = with C extends B implements D; +// ^^^^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:47:35: Error: 'implements' is already declared in this scope. // class N14 = B with C implements D implements D; // ^^^^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:46:29: Context: Previous declaration of 'implements'. -// class N13 = B with C with C implements D; +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:29: Context: Previous declaration of 'implements'. +// class N5 = with C extends B implements D; // ^^^^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:37: Error: 'implements' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^^^^^^^^^^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:47:35: Context: Previous declaration of 'implements'. -// class N14 = B with C implements D implements D; -// ^^^^^^^^^^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:29: Context: Previous declaration of 'implements'. +// class N5 = with C extends B implements D; +// ^^^^^^^^^^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:40:45: Error: 'D' is already declared in this scope. // class N7 = B with C implements D implements D; @@ -1423,44 +1423,44 @@ library; // pkg/front_end/testcases/general/error_recovery/class_header.dart:43:46: Error: 'D' is already declared in this scope. // class N10 = B implements D with C implements D; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:40:45: Context: Previous declaration of 'D'. -// class N7 = B with C implements D implements D; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:40: Context: Previous declaration of 'D'. +// class N5 = with C extends B implements D; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:45:43: Error: 'D' is already declared in this scope. // class N12 = B extends B with C implements D; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:43:46: Context: Previous declaration of 'D'. -// class N10 = B implements D with C implements D; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:40: Context: Previous declaration of 'D'. +// class N5 = with C extends B implements D; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:46:40: Error: 'D' is already declared in this scope. // class N13 = B with C with C implements D; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:45:43: Context: Previous declaration of 'D'. -// class N12 = B extends B with C implements D; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:40: Context: Previous declaration of 'D'. +// class N5 = with C extends B implements D; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:47:46: Error: 'D' is already declared in this scope. // class N14 = B with C implements D implements D; // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:46:40: Context: Previous declaration of 'D'. -// class N13 = B with C with C implements D; +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:40: Context: Previous declaration of 'D'. +// class N5 = with C extends B implements D; // ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:73:48: Error: 'D' is already declared in this scope. // enum E12 extends B extends B with C implements D { element } // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:47:46: Context: Previous declaration of 'D'. -// class N14 = B with C implements D implements D; -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:40: Context: Previous declaration of 'D'. +// class N5 = with C extends B implements D; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:91:7: Error: 'D' is already declared in this scope. // class D {} // ^ -// pkg/front_end/testcases/general/error_recovery/class_header.dart:73:48: Context: Previous declaration of 'D'. -// enum E12 extends B extends B with C implements D { element } -// ^ +// pkg/front_end/testcases/general/error_recovery/class_header.dart:38:40: Context: Previous declaration of 'D'. +// class N5 = with C extends B implements D; +// ^ // // pkg/front_end/testcases/general/error_recovery/class_header.dart:38:27: Error: 'B' isn't a type. // class N5 = with C extends B implements D; diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.expect index e45888683bea..8f518d5c27fc 100644 --- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.expect +++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.expect @@ -170,15 +170,15 @@ library; // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:36:7: Error: 'Foo' is already declared in this scope. // int Foo; // ^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:9:7: Context: Previous declaration of 'Foo'. -// get Foo { +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:8:7: Context: Previous declaration of 'Foo'. +// get Foo => 0; // ^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:37:10: Error: 'Foo' is already declared in this scope. // int A, Foo, B; // ^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:36:7: Context: Previous declaration of 'Foo'. -// int Foo; +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:8:7: Context: Previous declaration of 'Foo'. +// get Foo => 0; // ^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:13:7: Error: 'Foo.X' is already declared in this scope. @@ -191,36 +191,36 @@ library; // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:17:7: Error: 'Foo.X' is already declared in this scope. // get Foo.X : bla = null { // ^^^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:13:7: Context: Previous declaration of 'Foo.X'. -// get Foo.X { +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'. +// get Foo.X => 0; // ^^^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Error: 'Foo.X' is already declared in this scope. // set Foo.X => 0; // ^^^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:17:7: Context: Previous declaration of 'Foo.X'. -// get Foo.X : bla = null { +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'. +// get Foo.X => 0; // ^^^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Error: 'Foo.X' is already declared in this scope. // set Foo.X { // ^^^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Context: Previous declaration of 'Foo.X'. -// set Foo.X => 0; +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'. +// get Foo.X => 0; // ^^^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:29:7: Error: 'Foo.X' is already declared in this scope. // set Foo.X : bla = null { // ^^^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Context: Previous declaration of 'Foo.X'. -// set Foo.X { +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'. +// get Foo.X => 0; // ^^^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:33:12: Error: 'Foo.X' is already declared in this scope. // external Foo.X() : bla = null { // ^^^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:29:7: Context: Previous declaration of 'Foo.X'. -// set Foo.X : bla = null { +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'. +// get Foo.X => 0; // ^^^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Error: 'Foo' is already declared in this scope. @@ -233,26 +233,10 @@ library; // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:32:12: Error: 'Foo' is already declared in this scope. // external Foo() : bla = null; // ^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Context: Previous declaration of 'Foo'. -// set Foo : bla = null => 0; +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:16:7: Context: Previous declaration of 'Foo'. +// get Foo : bla = null => 0; // ^^^ // -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:21:7: Error: Conflicts with the implicit setter of the field 'Foo'. -// set Foo { -// ^ -// -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:20:7: Error: Conflicts with the implicit setter of the field 'Foo'. -// set Foo => 0; -// ^ -// -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:37:10: Error: Conflicts with setter 'Foo'. -// int A, Foo, B; -// ^ -// -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:36:7: Error: Conflicts with setter 'Foo'. -// int Foo; -// ^ -// // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:5:13: Error: 'initializer' isn't an instance field of this class. // foo.x() : initializer = true { } // ^^^^^^^^^^^ @@ -370,4 +354,10 @@ Try removing the return type. ^"; get Foo() → dynamic return 0; + set Foo(dynamic #synthetic) → void { + invalid-expression "pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:20:11: Error: A setter should have exactly one formal parameter. + set Foo => 0; + ^"; + return 0; + } } diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.modular.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.modular.expect index e45888683bea..8f518d5c27fc 100644 --- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.modular.expect @@ -170,15 +170,15 @@ library; // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:36:7: Error: 'Foo' is already declared in this scope. // int Foo; // ^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:9:7: Context: Previous declaration of 'Foo'. -// get Foo { +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:8:7: Context: Previous declaration of 'Foo'. +// get Foo => 0; // ^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:37:10: Error: 'Foo' is already declared in this scope. // int A, Foo, B; // ^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:36:7: Context: Previous declaration of 'Foo'. -// int Foo; +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:8:7: Context: Previous declaration of 'Foo'. +// get Foo => 0; // ^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:13:7: Error: 'Foo.X' is already declared in this scope. @@ -191,36 +191,36 @@ library; // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:17:7: Error: 'Foo.X' is already declared in this scope. // get Foo.X : bla = null { // ^^^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:13:7: Context: Previous declaration of 'Foo.X'. -// get Foo.X { +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'. +// get Foo.X => 0; // ^^^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Error: 'Foo.X' is already declared in this scope. // set Foo.X => 0; // ^^^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:17:7: Context: Previous declaration of 'Foo.X'. -// get Foo.X : bla = null { +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'. +// get Foo.X => 0; // ^^^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Error: 'Foo.X' is already declared in this scope. // set Foo.X { // ^^^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Context: Previous declaration of 'Foo.X'. -// set Foo.X => 0; +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'. +// get Foo.X => 0; // ^^^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:29:7: Error: 'Foo.X' is already declared in this scope. // set Foo.X : bla = null { // ^^^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Context: Previous declaration of 'Foo.X'. -// set Foo.X { +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'. +// get Foo.X => 0; // ^^^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:33:12: Error: 'Foo.X' is already declared in this scope. // external Foo.X() : bla = null { // ^^^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:29:7: Context: Previous declaration of 'Foo.X'. -// set Foo.X : bla = null { +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'. +// get Foo.X => 0; // ^^^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Error: 'Foo' is already declared in this scope. @@ -233,26 +233,10 @@ library; // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:32:12: Error: 'Foo' is already declared in this scope. // external Foo() : bla = null; // ^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Context: Previous declaration of 'Foo'. -// set Foo : bla = null => 0; +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:16:7: Context: Previous declaration of 'Foo'. +// get Foo : bla = null => 0; // ^^^ // -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:21:7: Error: Conflicts with the implicit setter of the field 'Foo'. -// set Foo { -// ^ -// -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:20:7: Error: Conflicts with the implicit setter of the field 'Foo'. -// set Foo => 0; -// ^ -// -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:37:10: Error: Conflicts with setter 'Foo'. -// int A, Foo, B; -// ^ -// -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:36:7: Error: Conflicts with setter 'Foo'. -// int Foo; -// ^ -// // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:5:13: Error: 'initializer' isn't an instance field of this class. // foo.x() : initializer = true { } // ^^^^^^^^^^^ @@ -370,4 +354,10 @@ Try removing the return type. ^"; get Foo() → dynamic return 0; + set Foo(dynamic #synthetic) → void { + invalid-expression "pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:20:11: Error: A setter should have exactly one formal parameter. + set Foo => 0; + ^"; + return 0; + } } diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.outline.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.outline.expect index 0270f8a57734..ada7a6e7325d 100644 --- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.outline.expect @@ -170,15 +170,15 @@ library; // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:36:7: Error: 'Foo' is already declared in this scope. // int Foo; // ^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:9:7: Context: Previous declaration of 'Foo'. -// get Foo { +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:8:7: Context: Previous declaration of 'Foo'. +// get Foo => 0; // ^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:37:10: Error: 'Foo' is already declared in this scope. // int A, Foo, B; // ^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:36:7: Context: Previous declaration of 'Foo'. -// int Foo; +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:8:7: Context: Previous declaration of 'Foo'. +// get Foo => 0; // ^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:13:7: Error: 'Foo.X' is already declared in this scope. @@ -191,36 +191,36 @@ library; // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:17:7: Error: 'Foo.X' is already declared in this scope. // get Foo.X : bla = null { // ^^^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:13:7: Context: Previous declaration of 'Foo.X'. -// get Foo.X { +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'. +// get Foo.X => 0; // ^^^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Error: 'Foo.X' is already declared in this scope. // set Foo.X => 0; // ^^^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:17:7: Context: Previous declaration of 'Foo.X'. -// get Foo.X : bla = null { +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'. +// get Foo.X => 0; // ^^^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Error: 'Foo.X' is already declared in this scope. // set Foo.X { // ^^^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Context: Previous declaration of 'Foo.X'. -// set Foo.X => 0; +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'. +// get Foo.X => 0; // ^^^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:29:7: Error: 'Foo.X' is already declared in this scope. // set Foo.X : bla = null { // ^^^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Context: Previous declaration of 'Foo.X'. -// set Foo.X { +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'. +// get Foo.X => 0; // ^^^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:33:12: Error: 'Foo.X' is already declared in this scope. // external Foo.X() : bla = null { // ^^^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:29:7: Context: Previous declaration of 'Foo.X'. -// set Foo.X : bla = null { +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'. +// get Foo.X => 0; // ^^^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Error: 'Foo' is already declared in this scope. @@ -233,26 +233,10 @@ library; // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:32:12: Error: 'Foo' is already declared in this scope. // external Foo() : bla = null; // ^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Context: Previous declaration of 'Foo'. -// set Foo : bla = null => 0; +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:16:7: Context: Previous declaration of 'Foo'. +// get Foo : bla = null => 0; // ^^^ // -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:21:7: Error: Conflicts with the implicit setter of the field 'Foo'. -// set Foo { -// ^ -// -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:20:7: Error: Conflicts with the implicit setter of the field 'Foo'. -// set Foo => 0; -// ^ -// -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:37:10: Error: Conflicts with setter 'Foo'. -// int A, Foo, B; -// ^ -// -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:36:7: Error: Conflicts with setter 'Foo'. -// int Foo; -// ^ -// import self as self; import "dart:core" as core; @@ -269,4 +253,6 @@ class Foo extends core::Object { ; get Foo() → dynamic ; + set Foo(dynamic #synthetic) → void + ; } diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.transformed.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.transformed.expect index e45888683bea..8f518d5c27fc 100644 --- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.transformed.expect @@ -170,15 +170,15 @@ library; // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:36:7: Error: 'Foo' is already declared in this scope. // int Foo; // ^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:9:7: Context: Previous declaration of 'Foo'. -// get Foo { +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:8:7: Context: Previous declaration of 'Foo'. +// get Foo => 0; // ^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:37:10: Error: 'Foo' is already declared in this scope. // int A, Foo, B; // ^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:36:7: Context: Previous declaration of 'Foo'. -// int Foo; +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:8:7: Context: Previous declaration of 'Foo'. +// get Foo => 0; // ^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:13:7: Error: 'Foo.X' is already declared in this scope. @@ -191,36 +191,36 @@ library; // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:17:7: Error: 'Foo.X' is already declared in this scope. // get Foo.X : bla = null { // ^^^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:13:7: Context: Previous declaration of 'Foo.X'. -// get Foo.X { +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'. +// get Foo.X => 0; // ^^^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Error: 'Foo.X' is already declared in this scope. // set Foo.X => 0; // ^^^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:17:7: Context: Previous declaration of 'Foo.X'. -// get Foo.X : bla = null { +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'. +// get Foo.X => 0; // ^^^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Error: 'Foo.X' is already declared in this scope. // set Foo.X { // ^^^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Context: Previous declaration of 'Foo.X'. -// set Foo.X => 0; +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'. +// get Foo.X => 0; // ^^^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:29:7: Error: 'Foo.X' is already declared in this scope. // set Foo.X : bla = null { // ^^^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Context: Previous declaration of 'Foo.X'. -// set Foo.X { +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'. +// get Foo.X => 0; // ^^^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:33:12: Error: 'Foo.X' is already declared in this scope. // external Foo.X() : bla = null { // ^^^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:29:7: Context: Previous declaration of 'Foo.X'. -// set Foo.X : bla = null { +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'. +// get Foo.X => 0; // ^^^^^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Error: 'Foo' is already declared in this scope. @@ -233,26 +233,10 @@ library; // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:32:12: Error: 'Foo' is already declared in this scope. // external Foo() : bla = null; // ^^^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Context: Previous declaration of 'Foo'. -// set Foo : bla = null => 0; +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:16:7: Context: Previous declaration of 'Foo'. +// get Foo : bla = null => 0; // ^^^ // -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:21:7: Error: Conflicts with the implicit setter of the field 'Foo'. -// set Foo { -// ^ -// -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:20:7: Error: Conflicts with the implicit setter of the field 'Foo'. -// set Foo => 0; -// ^ -// -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:37:10: Error: Conflicts with setter 'Foo'. -// int A, Foo, B; -// ^ -// -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:36:7: Error: Conflicts with setter 'Foo'. -// int Foo; -// ^ -// // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:5:13: Error: 'initializer' isn't an instance field of this class. // foo.x() : initializer = true { } // ^^^^^^^^^^^ @@ -370,4 +354,10 @@ Try removing the return type. ^"; get Foo() → dynamic return 0; + set Foo(dynamic #synthetic) → void { + invalid-expression "pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:20:11: Error: A setter should have exactly one formal parameter. + set Foo => 0; + ^"; + return 0; + } } diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.expect index e8cbcfdcda67..fcbfdc4e29ff 100644 --- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.expect +++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.expect @@ -115,15 +115,15 @@ library; // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:9: Error: 'Foo./' is already declared in this scope. // foo() / : super() {} // ^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:9: Context: Previous declaration of 'Foo./'. -// Foo()./ : super() {} +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:3:9: Context: Previous declaration of 'Foo./'. +// Foo() / : super() {} // ^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:9: Error: 'Foo./' is already declared in this scope. // foo()./ : super() {} // ^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:9: Context: Previous declaration of 'Foo./'. -// foo() / : super() {} +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:3:9: Context: Previous declaration of 'Foo./'. +// Foo() / : super() {} // ^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:3: Error: 'foo' is already declared in this scope. diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.modular.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.modular.expect index e8cbcfdcda67..fcbfdc4e29ff 100644 --- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.modular.expect @@ -115,15 +115,15 @@ library; // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:9: Error: 'Foo./' is already declared in this scope. // foo() / : super() {} // ^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:9: Context: Previous declaration of 'Foo./'. -// Foo()./ : super() {} +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:3:9: Context: Previous declaration of 'Foo./'. +// Foo() / : super() {} // ^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:9: Error: 'Foo./' is already declared in this scope. // foo()./ : super() {} // ^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:9: Context: Previous declaration of 'Foo./'. -// foo() / : super() {} +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:3:9: Context: Previous declaration of 'Foo./'. +// Foo() / : super() {} // ^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:3: Error: 'foo' is already declared in this scope. diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.outline.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.outline.expect index 890a602878c6..ff466a4b0544 100644 --- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.outline.expect @@ -115,15 +115,15 @@ library; // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:9: Error: 'Foo./' is already declared in this scope. // foo() / : super() {} // ^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:9: Context: Previous declaration of 'Foo./'. -// Foo()./ : super() {} +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:3:9: Context: Previous declaration of 'Foo./'. +// Foo() / : super() {} // ^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:9: Error: 'Foo./' is already declared in this scope. // foo()./ : super() {} // ^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:9: Context: Previous declaration of 'Foo./'. -// foo() / : super() {} +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:3:9: Context: Previous declaration of 'Foo./'. +// Foo() / : super() {} // ^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:3: Error: 'foo' is already declared in this scope. diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.transformed.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.transformed.expect index e8cbcfdcda67..fcbfdc4e29ff 100644 --- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.transformed.expect @@ -115,15 +115,15 @@ library; // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:9: Error: 'Foo./' is already declared in this scope. // foo() / : super() {} // ^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:9: Context: Previous declaration of 'Foo./'. -// Foo()./ : super() {} +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:3:9: Context: Previous declaration of 'Foo./'. +// Foo() / : super() {} // ^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:9: Error: 'Foo./' is already declared in this scope. // foo()./ : super() {} // ^ -// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:9: Context: Previous declaration of 'Foo./'. -// foo() / : super() {} +// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:3:9: Context: Previous declaration of 'Foo./'. +// Foo() / : super() {} // ^ // // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:3: Error: 'foo' is already declared in this scope. diff --git a/pkg/front_end/testcases/general/hierarchy/conflict.dart.strong.expect b/pkg/front_end/testcases/general/hierarchy/conflict.dart.strong.expect index 4ada6dba0836..dfa1b7bd5ee2 100644 --- a/pkg/front_end/testcases/general/hierarchy/conflict.dart.strong.expect +++ b/pkg/front_end/testcases/general/hierarchy/conflict.dart.strong.expect @@ -2,6 +2,13 @@ library; // // Problems in library: // +// pkg/front_end/testcases/general/hierarchy/conflict.dart:115:12: Error: The setter conflicts with declaration 'declaredMethodAndSetter'. +// void set declaredMethodAndSetter(int value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/general/hierarchy/conflict.dart:114:8: Context: Conflicting declaration 'declaredMethodAndSetter'. +// void declaredMethodAndSetter() {} +// ^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/general/hierarchy/conflict.dart:90:16: Error: Can't inherit members that conflict with each other. // abstract class Class extends Super // ^^^^^^^^^^^^^^^^ @@ -117,13 +124,6 @@ library; // int implementedFieldDeclaredMethod = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/general/hierarchy/conflict.dart:115:12: Error: 'declaredMethodAndSetter' is already declared in this scope. -// void set declaredMethodAndSetter(int value) {} -// ^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/general/hierarchy/conflict.dart:114:8: Context: Previous declaration of 'declaredMethodAndSetter'. -// void declaredMethodAndSetter() {} -// ^^^^^^^^^^^^^^^^^^^^^^^ -// // pkg/front_end/testcases/general/hierarchy/conflict.dart:94:12: Error: Can't declare a member that conflicts with an inherited one. // void set extendedMethodDeclaredSetter(int value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/pkg/front_end/testcases/general/hierarchy/conflict.dart.strong.modular.expect b/pkg/front_end/testcases/general/hierarchy/conflict.dart.strong.modular.expect index 4ada6dba0836..dfa1b7bd5ee2 100644 --- a/pkg/front_end/testcases/general/hierarchy/conflict.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/hierarchy/conflict.dart.strong.modular.expect @@ -2,6 +2,13 @@ library; // // Problems in library: // +// pkg/front_end/testcases/general/hierarchy/conflict.dart:115:12: Error: The setter conflicts with declaration 'declaredMethodAndSetter'. +// void set declaredMethodAndSetter(int value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/general/hierarchy/conflict.dart:114:8: Context: Conflicting declaration 'declaredMethodAndSetter'. +// void declaredMethodAndSetter() {} +// ^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/general/hierarchy/conflict.dart:90:16: Error: Can't inherit members that conflict with each other. // abstract class Class extends Super // ^^^^^^^^^^^^^^^^ @@ -117,13 +124,6 @@ library; // int implementedFieldDeclaredMethod = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/general/hierarchy/conflict.dart:115:12: Error: 'declaredMethodAndSetter' is already declared in this scope. -// void set declaredMethodAndSetter(int value) {} -// ^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/general/hierarchy/conflict.dart:114:8: Context: Previous declaration of 'declaredMethodAndSetter'. -// void declaredMethodAndSetter() {} -// ^^^^^^^^^^^^^^^^^^^^^^^ -// // pkg/front_end/testcases/general/hierarchy/conflict.dart:94:12: Error: Can't declare a member that conflicts with an inherited one. // void set extendedMethodDeclaredSetter(int value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/pkg/front_end/testcases/general/hierarchy/conflict.dart.strong.outline.expect b/pkg/front_end/testcases/general/hierarchy/conflict.dart.strong.outline.expect index 67ecd603f04c..86f83691c0ce 100644 --- a/pkg/front_end/testcases/general/hierarchy/conflict.dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/hierarchy/conflict.dart.strong.outline.expect @@ -2,6 +2,13 @@ library; // // Problems in library: // +// pkg/front_end/testcases/general/hierarchy/conflict.dart:115:12: Error: The setter conflicts with declaration 'declaredMethodAndSetter'. +// void set declaredMethodAndSetter(int value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/general/hierarchy/conflict.dart:114:8: Context: Conflicting declaration 'declaredMethodAndSetter'. +// void declaredMethodAndSetter() {} +// ^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/general/hierarchy/conflict.dart:90:16: Error: Can't inherit members that conflict with each other. // abstract class Class extends Super // ^^^^^^^^^^^^^^^^ @@ -117,13 +124,6 @@ library; // int implementedFieldDeclaredMethod = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/general/hierarchy/conflict.dart:115:12: Error: 'declaredMethodAndSetter' is already declared in this scope. -// void set declaredMethodAndSetter(int value) {} -// ^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/general/hierarchy/conflict.dart:114:8: Context: Previous declaration of 'declaredMethodAndSetter'. -// void declaredMethodAndSetter() {} -// ^^^^^^^^^^^^^^^^^^^^^^^ -// // pkg/front_end/testcases/general/hierarchy/conflict.dart:94:12: Error: Can't declare a member that conflicts with an inherited one. // void set extendedMethodDeclaredSetter(int value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/pkg/front_end/testcases/general/issue41842.dart.strong.expect b/pkg/front_end/testcases/general/issue41842.dart.strong.expect index fbd26d7b7f07..a08b25207861 100644 --- a/pkg/front_end/testcases/general/issue41842.dart.strong.expect +++ b/pkg/front_end/testcases/general/issue41842.dart.strong.expect @@ -136,16 +136,16 @@ library; // pkg/front_end/testcases/general/issue41842.dart:20:37: Error: 'T' is already declared in this scope. // factory A.foo12(int x) = B.foo; // Error. Not allowed by parser. // ^ -// pkg/front_end/testcases/general/issue41842.dart:18:40: Context: Previous declaration of 'T'. -// factory A.foo10(int x) = lib.Foo.bar; // Error. Not allowed by parser. -// ^ +// pkg/front_end/testcases/general/issue41842.dart:16:39: Context: Previous declaration of 'T'. +// factory A.foo8(int x) = lib.Foo.foo; // Error. Not allowed by parser. +// ^ // // pkg/front_end/testcases/general/issue41842.dart:21:37: Error: 'T' is already declared in this scope. // factory A.foo13(int x) = B.bar; // Error. Not allowed by parser. // ^ -// pkg/front_end/testcases/general/issue41842.dart:20:37: Context: Previous declaration of 'T'. -// factory A.foo12(int x) = B.foo; // Error. Not allowed by parser. -// ^ +// pkg/front_end/testcases/general/issue41842.dart:16:39: Context: Previous declaration of 'T'. +// factory A.foo8(int x) = lib.Foo.foo; // Error. Not allowed by parser. +// ^ // // pkg/front_end/testcases/general/issue41842.dart:18:41: Error: '>' is already declared in this scope. // factory A.foo10(int x) = lib.Foo.bar; // Error. Not allowed by parser. @@ -157,16 +157,16 @@ library; // pkg/front_end/testcases/general/issue41842.dart:20:38: Error: '>' is already declared in this scope. // factory A.foo12(int x) = B.foo; // Error. Not allowed by parser. // ^ -// pkg/front_end/testcases/general/issue41842.dart:18:41: Context: Previous declaration of '>'. -// factory A.foo10(int x) = lib.Foo.bar; // Error. Not allowed by parser. -// ^ +// pkg/front_end/testcases/general/issue41842.dart:16:40: Context: Previous declaration of '>'. +// factory A.foo8(int x) = lib.Foo.foo; // Error. Not allowed by parser. +// ^ // // pkg/front_end/testcases/general/issue41842.dart:21:38: Error: '>' is already declared in this scope. // factory A.foo13(int x) = B.bar; // Error. Not allowed by parser. // ^ -// pkg/front_end/testcases/general/issue41842.dart:20:38: Context: Previous declaration of '>'. -// factory A.foo12(int x) = B.foo; // Error. Not allowed by parser. -// ^ +// pkg/front_end/testcases/general/issue41842.dart:16:40: Context: Previous declaration of '>'. +// factory A.foo8(int x) = lib.Foo.foo; // Error. Not allowed by parser. +// ^ // // pkg/front_end/testcases/general/issue41842.dart:21:37: Error: Conflicts with type variable 'T'. // factory A.foo13(int x) = B.bar; // Error. Not allowed by parser. diff --git a/pkg/front_end/testcases/general/issue41842.dart.strong.modular.expect b/pkg/front_end/testcases/general/issue41842.dart.strong.modular.expect index fbd26d7b7f07..a08b25207861 100644 --- a/pkg/front_end/testcases/general/issue41842.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/issue41842.dart.strong.modular.expect @@ -136,16 +136,16 @@ library; // pkg/front_end/testcases/general/issue41842.dart:20:37: Error: 'T' is already declared in this scope. // factory A.foo12(int x) = B.foo; // Error. Not allowed by parser. // ^ -// pkg/front_end/testcases/general/issue41842.dart:18:40: Context: Previous declaration of 'T'. -// factory A.foo10(int x) = lib.Foo.bar; // Error. Not allowed by parser. -// ^ +// pkg/front_end/testcases/general/issue41842.dart:16:39: Context: Previous declaration of 'T'. +// factory A.foo8(int x) = lib.Foo.foo; // Error. Not allowed by parser. +// ^ // // pkg/front_end/testcases/general/issue41842.dart:21:37: Error: 'T' is already declared in this scope. // factory A.foo13(int x) = B.bar; // Error. Not allowed by parser. // ^ -// pkg/front_end/testcases/general/issue41842.dart:20:37: Context: Previous declaration of 'T'. -// factory A.foo12(int x) = B.foo; // Error. Not allowed by parser. -// ^ +// pkg/front_end/testcases/general/issue41842.dart:16:39: Context: Previous declaration of 'T'. +// factory A.foo8(int x) = lib.Foo.foo; // Error. Not allowed by parser. +// ^ // // pkg/front_end/testcases/general/issue41842.dart:18:41: Error: '>' is already declared in this scope. // factory A.foo10(int x) = lib.Foo.bar; // Error. Not allowed by parser. @@ -157,16 +157,16 @@ library; // pkg/front_end/testcases/general/issue41842.dart:20:38: Error: '>' is already declared in this scope. // factory A.foo12(int x) = B.foo; // Error. Not allowed by parser. // ^ -// pkg/front_end/testcases/general/issue41842.dart:18:41: Context: Previous declaration of '>'. -// factory A.foo10(int x) = lib.Foo.bar; // Error. Not allowed by parser. -// ^ +// pkg/front_end/testcases/general/issue41842.dart:16:40: Context: Previous declaration of '>'. +// factory A.foo8(int x) = lib.Foo.foo; // Error. Not allowed by parser. +// ^ // // pkg/front_end/testcases/general/issue41842.dart:21:38: Error: '>' is already declared in this scope. // factory A.foo13(int x) = B.bar; // Error. Not allowed by parser. // ^ -// pkg/front_end/testcases/general/issue41842.dart:20:38: Context: Previous declaration of '>'. -// factory A.foo12(int x) = B.foo; // Error. Not allowed by parser. -// ^ +// pkg/front_end/testcases/general/issue41842.dart:16:40: Context: Previous declaration of '>'. +// factory A.foo8(int x) = lib.Foo.foo; // Error. Not allowed by parser. +// ^ // // pkg/front_end/testcases/general/issue41842.dart:21:37: Error: Conflicts with type variable 'T'. // factory A.foo13(int x) = B.bar; // Error. Not allowed by parser. diff --git a/pkg/front_end/testcases/general/issue41842.dart.strong.outline.expect b/pkg/front_end/testcases/general/issue41842.dart.strong.outline.expect index d05a928ef659..e4e2ad944ed4 100644 --- a/pkg/front_end/testcases/general/issue41842.dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/issue41842.dart.strong.outline.expect @@ -136,16 +136,16 @@ library; // pkg/front_end/testcases/general/issue41842.dart:20:37: Error: 'T' is already declared in this scope. // factory A.foo12(int x) = B.foo; // Error. Not allowed by parser. // ^ -// pkg/front_end/testcases/general/issue41842.dart:18:40: Context: Previous declaration of 'T'. -// factory A.foo10(int x) = lib.Foo.bar; // Error. Not allowed by parser. -// ^ +// pkg/front_end/testcases/general/issue41842.dart:16:39: Context: Previous declaration of 'T'. +// factory A.foo8(int x) = lib.Foo.foo; // Error. Not allowed by parser. +// ^ // // pkg/front_end/testcases/general/issue41842.dart:21:37: Error: 'T' is already declared in this scope. // factory A.foo13(int x) = B.bar; // Error. Not allowed by parser. // ^ -// pkg/front_end/testcases/general/issue41842.dart:20:37: Context: Previous declaration of 'T'. -// factory A.foo12(int x) = B.foo; // Error. Not allowed by parser. -// ^ +// pkg/front_end/testcases/general/issue41842.dart:16:39: Context: Previous declaration of 'T'. +// factory A.foo8(int x) = lib.Foo.foo; // Error. Not allowed by parser. +// ^ // // pkg/front_end/testcases/general/issue41842.dart:18:41: Error: '>' is already declared in this scope. // factory A.foo10(int x) = lib.Foo.bar; // Error. Not allowed by parser. @@ -157,16 +157,16 @@ library; // pkg/front_end/testcases/general/issue41842.dart:20:38: Error: '>' is already declared in this scope. // factory A.foo12(int x) = B.foo; // Error. Not allowed by parser. // ^ -// pkg/front_end/testcases/general/issue41842.dart:18:41: Context: Previous declaration of '>'. -// factory A.foo10(int x) = lib.Foo.bar; // Error. Not allowed by parser. -// ^ +// pkg/front_end/testcases/general/issue41842.dart:16:40: Context: Previous declaration of '>'. +// factory A.foo8(int x) = lib.Foo.foo; // Error. Not allowed by parser. +// ^ // // pkg/front_end/testcases/general/issue41842.dart:21:38: Error: '>' is already declared in this scope. // factory A.foo13(int x) = B.bar; // Error. Not allowed by parser. // ^ -// pkg/front_end/testcases/general/issue41842.dart:20:38: Context: Previous declaration of '>'. -// factory A.foo12(int x) = B.foo; // Error. Not allowed by parser. -// ^ +// pkg/front_end/testcases/general/issue41842.dart:16:40: Context: Previous declaration of '>'. +// factory A.foo8(int x) = lib.Foo.foo; // Error. Not allowed by parser. +// ^ // // pkg/front_end/testcases/general/issue41842.dart:21:37: Error: Conflicts with type variable 'T'. // factory A.foo13(int x) = B.bar; // Error. Not allowed by parser. diff --git a/pkg/front_end/testcases/general/issue41842.dart.strong.transformed.expect b/pkg/front_end/testcases/general/issue41842.dart.strong.transformed.expect index fbd26d7b7f07..a08b25207861 100644 --- a/pkg/front_end/testcases/general/issue41842.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/issue41842.dart.strong.transformed.expect @@ -136,16 +136,16 @@ library; // pkg/front_end/testcases/general/issue41842.dart:20:37: Error: 'T' is already declared in this scope. // factory A.foo12(int x) = B.foo; // Error. Not allowed by parser. // ^ -// pkg/front_end/testcases/general/issue41842.dart:18:40: Context: Previous declaration of 'T'. -// factory A.foo10(int x) = lib.Foo.bar; // Error. Not allowed by parser. -// ^ +// pkg/front_end/testcases/general/issue41842.dart:16:39: Context: Previous declaration of 'T'. +// factory A.foo8(int x) = lib.Foo.foo; // Error. Not allowed by parser. +// ^ // // pkg/front_end/testcases/general/issue41842.dart:21:37: Error: 'T' is already declared in this scope. // factory A.foo13(int x) = B.bar; // Error. Not allowed by parser. // ^ -// pkg/front_end/testcases/general/issue41842.dart:20:37: Context: Previous declaration of 'T'. -// factory A.foo12(int x) = B.foo; // Error. Not allowed by parser. -// ^ +// pkg/front_end/testcases/general/issue41842.dart:16:39: Context: Previous declaration of 'T'. +// factory A.foo8(int x) = lib.Foo.foo; // Error. Not allowed by parser. +// ^ // // pkg/front_end/testcases/general/issue41842.dart:18:41: Error: '>' is already declared in this scope. // factory A.foo10(int x) = lib.Foo.bar; // Error. Not allowed by parser. @@ -157,16 +157,16 @@ library; // pkg/front_end/testcases/general/issue41842.dart:20:38: Error: '>' is already declared in this scope. // factory A.foo12(int x) = B.foo; // Error. Not allowed by parser. // ^ -// pkg/front_end/testcases/general/issue41842.dart:18:41: Context: Previous declaration of '>'. -// factory A.foo10(int x) = lib.Foo.bar; // Error. Not allowed by parser. -// ^ +// pkg/front_end/testcases/general/issue41842.dart:16:40: Context: Previous declaration of '>'. +// factory A.foo8(int x) = lib.Foo.foo; // Error. Not allowed by parser. +// ^ // // pkg/front_end/testcases/general/issue41842.dart:21:38: Error: '>' is already declared in this scope. // factory A.foo13(int x) = B.bar; // Error. Not allowed by parser. // ^ -// pkg/front_end/testcases/general/issue41842.dart:20:38: Context: Previous declaration of '>'. -// factory A.foo12(int x) = B.foo; // Error. Not allowed by parser. -// ^ +// pkg/front_end/testcases/general/issue41842.dart:16:40: Context: Previous declaration of '>'. +// factory A.foo8(int x) = lib.Foo.foo; // Error. Not allowed by parser. +// ^ // // pkg/front_end/testcases/general/issue41842.dart:21:37: Error: Conflicts with type variable 'T'. // factory A.foo13(int x) = B.bar; // Error. Not allowed by parser. diff --git a/pkg/front_end/testcases/macros/augment_class.dart.strong.expect b/pkg/front_end/testcases/macros/augment_class.dart.strong.expect index 4eb5d177af58..c776406ee464 100644 --- a/pkg/front_end/testcases/macros/augment_class.dart.strong.expect +++ b/pkg/front_end/testcases/macros/augment_class.dart.strong.expect @@ -58,15 +58,15 @@ library; // pkg/front_end/testcases/macros/augment_class.dart:10:1: Error: 'augment' is already declared in this scope. // augment class Class3 = Super with Mixin; // ^^^^^^^ -// pkg/front_end/testcases/macros/augment_class.dart:9:10: Context: Previous declaration of 'augment'. -// abstract augment class Class2 {} -// ^^^^^^^ +// pkg/front_end/testcases/macros/augment_class.dart:8:1: Context: Previous declaration of 'augment'. +// augment class Class1 {} +// ^^^^^^^ // // pkg/front_end/testcases/macros/augment_class.dart:11:10: Error: 'augment' is already declared in this scope. // abstract augment class Class4 = Super with Mixin; // ^^^^^^^ -// pkg/front_end/testcases/macros/augment_class.dart:10:1: Context: Previous declaration of 'augment'. -// augment class Class3 = Super with Mixin; +// pkg/front_end/testcases/macros/augment_class.dart:8:1: Context: Previous declaration of 'augment'. +// augment class Class1 {} // ^^^^^^^ // import self as self; diff --git a/pkg/front_end/testcases/macros/augment_class.dart.strong.modular.expect b/pkg/front_end/testcases/macros/augment_class.dart.strong.modular.expect index 4eb5d177af58..c776406ee464 100644 --- a/pkg/front_end/testcases/macros/augment_class.dart.strong.modular.expect +++ b/pkg/front_end/testcases/macros/augment_class.dart.strong.modular.expect @@ -58,15 +58,15 @@ library; // pkg/front_end/testcases/macros/augment_class.dart:10:1: Error: 'augment' is already declared in this scope. // augment class Class3 = Super with Mixin; // ^^^^^^^ -// pkg/front_end/testcases/macros/augment_class.dart:9:10: Context: Previous declaration of 'augment'. -// abstract augment class Class2 {} -// ^^^^^^^ +// pkg/front_end/testcases/macros/augment_class.dart:8:1: Context: Previous declaration of 'augment'. +// augment class Class1 {} +// ^^^^^^^ // // pkg/front_end/testcases/macros/augment_class.dart:11:10: Error: 'augment' is already declared in this scope. // abstract augment class Class4 = Super with Mixin; // ^^^^^^^ -// pkg/front_end/testcases/macros/augment_class.dart:10:1: Context: Previous declaration of 'augment'. -// augment class Class3 = Super with Mixin; +// pkg/front_end/testcases/macros/augment_class.dart:8:1: Context: Previous declaration of 'augment'. +// augment class Class1 {} // ^^^^^^^ // import self as self; diff --git a/pkg/front_end/testcases/macros/augment_class.dart.strong.outline.expect b/pkg/front_end/testcases/macros/augment_class.dart.strong.outline.expect index fa80a6781d30..4a8edcd2a0c4 100644 --- a/pkg/front_end/testcases/macros/augment_class.dart.strong.outline.expect +++ b/pkg/front_end/testcases/macros/augment_class.dart.strong.outline.expect @@ -58,15 +58,15 @@ library; // pkg/front_end/testcases/macros/augment_class.dart:10:1: Error: 'augment' is already declared in this scope. // augment class Class3 = Super with Mixin; // ^^^^^^^ -// pkg/front_end/testcases/macros/augment_class.dart:9:10: Context: Previous declaration of 'augment'. -// abstract augment class Class2 {} -// ^^^^^^^ +// pkg/front_end/testcases/macros/augment_class.dart:8:1: Context: Previous declaration of 'augment'. +// augment class Class1 {} +// ^^^^^^^ // // pkg/front_end/testcases/macros/augment_class.dart:11:10: Error: 'augment' is already declared in this scope. // abstract augment class Class4 = Super with Mixin; // ^^^^^^^ -// pkg/front_end/testcases/macros/augment_class.dart:10:1: Context: Previous declaration of 'augment'. -// augment class Class3 = Super with Mixin; +// pkg/front_end/testcases/macros/augment_class.dart:8:1: Context: Previous declaration of 'augment'. +// augment class Class1 {} // ^^^^^^^ // import self as self; diff --git a/pkg/front_end/testcases/macros/augment_class.dart.strong.transformed.expect b/pkg/front_end/testcases/macros/augment_class.dart.strong.transformed.expect index c901a780ddd4..a2e363664612 100644 --- a/pkg/front_end/testcases/macros/augment_class.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/macros/augment_class.dart.strong.transformed.expect @@ -58,15 +58,15 @@ library; // pkg/front_end/testcases/macros/augment_class.dart:10:1: Error: 'augment' is already declared in this scope. // augment class Class3 = Super with Mixin; // ^^^^^^^ -// pkg/front_end/testcases/macros/augment_class.dart:9:10: Context: Previous declaration of 'augment'. -// abstract augment class Class2 {} -// ^^^^^^^ +// pkg/front_end/testcases/macros/augment_class.dart:8:1: Context: Previous declaration of 'augment'. +// augment class Class1 {} +// ^^^^^^^ // // pkg/front_end/testcases/macros/augment_class.dart:11:10: Error: 'augment' is already declared in this scope. // abstract augment class Class4 = Super with Mixin; // ^^^^^^^ -// pkg/front_end/testcases/macros/augment_class.dart:10:1: Context: Previous declaration of 'augment'. -// augment class Class3 = Super with Mixin; +// pkg/front_end/testcases/macros/augment_class.dart:8:1: Context: Previous declaration of 'augment'. +// augment class Class1 {} // ^^^^^^^ // import self as self; diff --git a/pkg/front_end/testcases/nnbd/duplicates_instance.dart.strong.expect b/pkg/front_end/testcases/nnbd/duplicates_instance.dart.strong.expect index b6ad45352e6a..4a9c1b970dda 100644 --- a/pkg/front_end/testcases/nnbd/duplicates_instance.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/duplicates_instance.dart.strong.expect @@ -30,6 +30,34 @@ library; // int instanceField = 1; // ^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:26:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter1'. +// void set instanceFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:25:7: Context: Field 'instanceFieldAndSetter1' with the implicit setter. +// int instanceFieldAndSetter1 = 1; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:34:7: Error: Conflicts with setter 'instanceFieldAndSetter2'. +// int instanceFieldAndSetter2 = 1; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:30:12: Context: Conflicting setter 'instanceFieldAndSetter2'. +// void set instanceFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:37:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter1'. +// void set instanceLateFinalFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:36:18: Context: Field 'instanceLateFinalFieldAndSetter1' with the implicit setter. +// late final int instanceLateFinalFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:45:18: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter2'. +// late final int instanceLateFinalFieldAndSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:41:12: Context: Conflicting setter 'instanceLateFinalFieldAndSetter2'. +// void set instanceLateFinalFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/duplicates_instance.dart:48:13: Error: 'instanceDuplicateFieldAndSetter' is already declared in this scope. // final int instanceDuplicateFieldAndSetter = 2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -58,49 +86,17 @@ library; // void set instanceDuplicateFieldAndDuplicateSetter(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:26:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter1'. -// void set instanceFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:25:7: Error: Conflicts with setter 'instanceFieldAndSetter1'. -// int instanceFieldAndSetter1 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:30:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter2'. -// void set instanceFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:34:7: Error: Conflicts with setter 'instanceFieldAndSetter2'. -// int instanceFieldAndSetter2 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:37:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter1'. -// void set instanceLateFinalFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:36:18: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter1'. -// late final int instanceLateFinalFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:41:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter2'. -// void set instanceLateFinalFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:45:18: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter2'. -// late final int instanceLateFinalFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:73:12: Error: 'instanceMethodAndSetter1' is already declared in this scope. +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:73:12: Error: The setter conflicts with declaration 'instanceMethodAndSetter1'. // void set instanceMethodAndSetter1(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:72:7: Context: Previous declaration of 'instanceMethodAndSetter1'. +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:72:7: Context: Conflicting declaration 'instanceMethodAndSetter1'. // int instanceMethodAndSetter1() => 1; // ^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:81:7: Error: 'instanceMethodAndSetter2' is already declared in this scope. +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:81:7: Error: The declaration conflicts with setter 'instanceMethodAndSetter2'. // int instanceMethodAndSetter2() => 1; // ^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:77:12: Context: Previous declaration of 'instanceMethodAndSetter2'. +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:77:12: Context: Conflicting setter 'instanceMethodAndSetter2'. // void set instanceMethodAndSetter2(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^ // diff --git a/pkg/front_end/testcases/nnbd/duplicates_instance.dart.strong.modular.expect b/pkg/front_end/testcases/nnbd/duplicates_instance.dart.strong.modular.expect index b6ad45352e6a..4a9c1b970dda 100644 --- a/pkg/front_end/testcases/nnbd/duplicates_instance.dart.strong.modular.expect +++ b/pkg/front_end/testcases/nnbd/duplicates_instance.dart.strong.modular.expect @@ -30,6 +30,34 @@ library; // int instanceField = 1; // ^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:26:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter1'. +// void set instanceFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:25:7: Context: Field 'instanceFieldAndSetter1' with the implicit setter. +// int instanceFieldAndSetter1 = 1; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:34:7: Error: Conflicts with setter 'instanceFieldAndSetter2'. +// int instanceFieldAndSetter2 = 1; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:30:12: Context: Conflicting setter 'instanceFieldAndSetter2'. +// void set instanceFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:37:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter1'. +// void set instanceLateFinalFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:36:18: Context: Field 'instanceLateFinalFieldAndSetter1' with the implicit setter. +// late final int instanceLateFinalFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:45:18: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter2'. +// late final int instanceLateFinalFieldAndSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:41:12: Context: Conflicting setter 'instanceLateFinalFieldAndSetter2'. +// void set instanceLateFinalFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/duplicates_instance.dart:48:13: Error: 'instanceDuplicateFieldAndSetter' is already declared in this scope. // final int instanceDuplicateFieldAndSetter = 2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -58,49 +86,17 @@ library; // void set instanceDuplicateFieldAndDuplicateSetter(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:26:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter1'. -// void set instanceFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:25:7: Error: Conflicts with setter 'instanceFieldAndSetter1'. -// int instanceFieldAndSetter1 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:30:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter2'. -// void set instanceFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:34:7: Error: Conflicts with setter 'instanceFieldAndSetter2'. -// int instanceFieldAndSetter2 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:37:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter1'. -// void set instanceLateFinalFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:36:18: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter1'. -// late final int instanceLateFinalFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:41:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter2'. -// void set instanceLateFinalFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:45:18: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter2'. -// late final int instanceLateFinalFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:73:12: Error: 'instanceMethodAndSetter1' is already declared in this scope. +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:73:12: Error: The setter conflicts with declaration 'instanceMethodAndSetter1'. // void set instanceMethodAndSetter1(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:72:7: Context: Previous declaration of 'instanceMethodAndSetter1'. +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:72:7: Context: Conflicting declaration 'instanceMethodAndSetter1'. // int instanceMethodAndSetter1() => 1; // ^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:81:7: Error: 'instanceMethodAndSetter2' is already declared in this scope. +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:81:7: Error: The declaration conflicts with setter 'instanceMethodAndSetter2'. // int instanceMethodAndSetter2() => 1; // ^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:77:12: Context: Previous declaration of 'instanceMethodAndSetter2'. +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:77:12: Context: Conflicting setter 'instanceMethodAndSetter2'. // void set instanceMethodAndSetter2(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^ // diff --git a/pkg/front_end/testcases/nnbd/duplicates_instance.dart.strong.outline.expect b/pkg/front_end/testcases/nnbd/duplicates_instance.dart.strong.outline.expect index 2f52482256c9..d13870f4ac1a 100644 --- a/pkg/front_end/testcases/nnbd/duplicates_instance.dart.strong.outline.expect +++ b/pkg/front_end/testcases/nnbd/duplicates_instance.dart.strong.outline.expect @@ -30,6 +30,34 @@ library; // int instanceField = 1; // ^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:26:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter1'. +// void set instanceFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:25:7: Context: Field 'instanceFieldAndSetter1' with the implicit setter. +// int instanceFieldAndSetter1 = 1; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:34:7: Error: Conflicts with setter 'instanceFieldAndSetter2'. +// int instanceFieldAndSetter2 = 1; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:30:12: Context: Conflicting setter 'instanceFieldAndSetter2'. +// void set instanceFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:37:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter1'. +// void set instanceLateFinalFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:36:18: Context: Field 'instanceLateFinalFieldAndSetter1' with the implicit setter. +// late final int instanceLateFinalFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:45:18: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter2'. +// late final int instanceLateFinalFieldAndSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:41:12: Context: Conflicting setter 'instanceLateFinalFieldAndSetter2'. +// void set instanceLateFinalFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/duplicates_instance.dart:48:13: Error: 'instanceDuplicateFieldAndSetter' is already declared in this scope. // final int instanceDuplicateFieldAndSetter = 2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -58,49 +86,17 @@ library; // void set instanceDuplicateFieldAndDuplicateSetter(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:26:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter1'. -// void set instanceFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:25:7: Error: Conflicts with setter 'instanceFieldAndSetter1'. -// int instanceFieldAndSetter1 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:30:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter2'. -// void set instanceFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:34:7: Error: Conflicts with setter 'instanceFieldAndSetter2'. -// int instanceFieldAndSetter2 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:37:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter1'. -// void set instanceLateFinalFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:36:18: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter1'. -// late final int instanceLateFinalFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:41:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter2'. -// void set instanceLateFinalFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:45:18: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter2'. -// late final int instanceLateFinalFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:73:12: Error: 'instanceMethodAndSetter1' is already declared in this scope. +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:73:12: Error: The setter conflicts with declaration 'instanceMethodAndSetter1'. // void set instanceMethodAndSetter1(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:72:7: Context: Previous declaration of 'instanceMethodAndSetter1'. +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:72:7: Context: Conflicting declaration 'instanceMethodAndSetter1'. // int instanceMethodAndSetter1() => 1; // ^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:81:7: Error: 'instanceMethodAndSetter2' is already declared in this scope. +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:81:7: Error: The declaration conflicts with setter 'instanceMethodAndSetter2'. // int instanceMethodAndSetter2() => 1; // ^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:77:12: Context: Previous declaration of 'instanceMethodAndSetter2'. +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:77:12: Context: Conflicting setter 'instanceMethodAndSetter2'. // void set instanceMethodAndSetter2(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^ // diff --git a/pkg/front_end/testcases/nnbd/duplicates_instance.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/duplicates_instance.dart.strong.transformed.expect index b6ad45352e6a..4a9c1b970dda 100644 --- a/pkg/front_end/testcases/nnbd/duplicates_instance.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/duplicates_instance.dart.strong.transformed.expect @@ -30,6 +30,34 @@ library; // int instanceField = 1; // ^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:26:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter1'. +// void set instanceFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:25:7: Context: Field 'instanceFieldAndSetter1' with the implicit setter. +// int instanceFieldAndSetter1 = 1; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:34:7: Error: Conflicts with setter 'instanceFieldAndSetter2'. +// int instanceFieldAndSetter2 = 1; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:30:12: Context: Conflicting setter 'instanceFieldAndSetter2'. +// void set instanceFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:37:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter1'. +// void set instanceLateFinalFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:36:18: Context: Field 'instanceLateFinalFieldAndSetter1' with the implicit setter. +// late final int instanceLateFinalFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:45:18: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter2'. +// late final int instanceLateFinalFieldAndSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:41:12: Context: Conflicting setter 'instanceLateFinalFieldAndSetter2'. +// void set instanceLateFinalFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/duplicates_instance.dart:48:13: Error: 'instanceDuplicateFieldAndSetter' is already declared in this scope. // final int instanceDuplicateFieldAndSetter = 2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -58,49 +86,17 @@ library; // void set instanceDuplicateFieldAndDuplicateSetter(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:26:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter1'. -// void set instanceFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:25:7: Error: Conflicts with setter 'instanceFieldAndSetter1'. -// int instanceFieldAndSetter1 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:30:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter2'. -// void set instanceFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:34:7: Error: Conflicts with setter 'instanceFieldAndSetter2'. -// int instanceFieldAndSetter2 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:37:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter1'. -// void set instanceLateFinalFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:36:18: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter1'. -// late final int instanceLateFinalFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:41:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter2'. -// void set instanceLateFinalFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:45:18: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter2'. -// late final int instanceLateFinalFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:73:12: Error: 'instanceMethodAndSetter1' is already declared in this scope. +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:73:12: Error: The setter conflicts with declaration 'instanceMethodAndSetter1'. // void set instanceMethodAndSetter1(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:72:7: Context: Previous declaration of 'instanceMethodAndSetter1'. +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:72:7: Context: Conflicting declaration 'instanceMethodAndSetter1'. // int instanceMethodAndSetter1() => 1; // ^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:81:7: Error: 'instanceMethodAndSetter2' is already declared in this scope. +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:81:7: Error: The declaration conflicts with setter 'instanceMethodAndSetter2'. // int instanceMethodAndSetter2() => 1; // ^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/duplicates_instance.dart:77:12: Context: Previous declaration of 'instanceMethodAndSetter2'. +// pkg/front_end/testcases/nnbd/duplicates_instance.dart:77:12: Context: Conflicting setter 'instanceMethodAndSetter2'. // void set instanceMethodAndSetter2(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^ // diff --git a/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.expect b/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.expect index 6767d6b6f81a..0c9bbc4ecdfc 100644 --- a/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.expect @@ -85,6 +85,34 @@ library; // int instanceField = 1; // ^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:26:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter1'. +// void set instanceFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:25:7: Context: Field 'instanceFieldAndSetter1' with the implicit setter. +// int instanceFieldAndSetter1 = 1; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:33:7: Error: Conflicts with setter 'instanceFieldAndSetter2'. +// int instanceFieldAndSetter2 = 1; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:30:12: Context: Conflicting setter 'instanceFieldAndSetter2'. +// void set instanceFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:36:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter1'. +// void set instanceLateFinalFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:35:18: Context: Field 'instanceLateFinalFieldAndSetter1' with the implicit setter. +// late final int instanceLateFinalFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:43:18: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter2'. +// late final int instanceLateFinalFieldAndSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:40:12: Context: Conflicting setter 'instanceLateFinalFieldAndSetter2'. +// void set instanceLateFinalFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:46:13: Error: 'instanceDuplicateFieldAndSetter' is already declared in this scope. // final int instanceDuplicateFieldAndSetter = 2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -113,53 +141,19 @@ library; // void set instanceDuplicateFieldAndDuplicateSetter(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:26:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter1'. -// void set instanceFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:25:7: Error: Conflicts with setter 'instanceFieldAndSetter1'. -// int instanceFieldAndSetter1 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:30:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter2'. -// void set instanceFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:33:7: Error: Conflicts with setter 'instanceFieldAndSetter2'. -// int instanceFieldAndSetter2 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:36:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter1'. -// void set instanceLateFinalFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:35:18: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter1'. -// late final int instanceLateFinalFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:40:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter2'. -// void set instanceLateFinalFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:43:18: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter2'. -// late final int instanceLateFinalFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:71:12: Error: Conflicts with member 'instanceMethodAndSetter1'. +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:71:12: Error: The setter conflicts with declaration 'instanceMethodAndSetter1'. // void set instanceMethodAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:70:7: Error: Conflicts with setter 'instanceMethodAndSetter1'. +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:70:7: Context: Conflicting declaration 'instanceMethodAndSetter1'. // int instanceMethodAndSetter1() => 1; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:75:12: Error: Conflicts with member 'instanceMethodAndSetter2'. -// void set instanceMethodAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:78:7: Error: Conflicts with setter 'instanceMethodAndSetter2'. +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:78:7: Error: The declaration conflicts with setter 'instanceMethodAndSetter2'. // int instanceMethodAndSetter2() => 1; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:75:12: Context: Conflicting setter 'instanceMethodAndSetter2'. +// void set instanceMethodAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:83:5: Error: The method 'instanceMethod' isn't defined for the class 'int'. // Try correcting the name to the name of an existing method, or defining a method named 'instanceMethod'. diff --git a/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.modular.expect b/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.modular.expect index 6767d6b6f81a..0c9bbc4ecdfc 100644 --- a/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.modular.expect +++ b/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.modular.expect @@ -85,6 +85,34 @@ library; // int instanceField = 1; // ^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:26:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter1'. +// void set instanceFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:25:7: Context: Field 'instanceFieldAndSetter1' with the implicit setter. +// int instanceFieldAndSetter1 = 1; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:33:7: Error: Conflicts with setter 'instanceFieldAndSetter2'. +// int instanceFieldAndSetter2 = 1; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:30:12: Context: Conflicting setter 'instanceFieldAndSetter2'. +// void set instanceFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:36:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter1'. +// void set instanceLateFinalFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:35:18: Context: Field 'instanceLateFinalFieldAndSetter1' with the implicit setter. +// late final int instanceLateFinalFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:43:18: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter2'. +// late final int instanceLateFinalFieldAndSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:40:12: Context: Conflicting setter 'instanceLateFinalFieldAndSetter2'. +// void set instanceLateFinalFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:46:13: Error: 'instanceDuplicateFieldAndSetter' is already declared in this scope. // final int instanceDuplicateFieldAndSetter = 2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -113,53 +141,19 @@ library; // void set instanceDuplicateFieldAndDuplicateSetter(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:26:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter1'. -// void set instanceFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:25:7: Error: Conflicts with setter 'instanceFieldAndSetter1'. -// int instanceFieldAndSetter1 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:30:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter2'. -// void set instanceFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:33:7: Error: Conflicts with setter 'instanceFieldAndSetter2'. -// int instanceFieldAndSetter2 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:36:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter1'. -// void set instanceLateFinalFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:35:18: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter1'. -// late final int instanceLateFinalFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:40:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter2'. -// void set instanceLateFinalFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:43:18: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter2'. -// late final int instanceLateFinalFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:71:12: Error: Conflicts with member 'instanceMethodAndSetter1'. +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:71:12: Error: The setter conflicts with declaration 'instanceMethodAndSetter1'. // void set instanceMethodAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:70:7: Error: Conflicts with setter 'instanceMethodAndSetter1'. +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:70:7: Context: Conflicting declaration 'instanceMethodAndSetter1'. // int instanceMethodAndSetter1() => 1; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:75:12: Error: Conflicts with member 'instanceMethodAndSetter2'. -// void set instanceMethodAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:78:7: Error: Conflicts with setter 'instanceMethodAndSetter2'. +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:78:7: Error: The declaration conflicts with setter 'instanceMethodAndSetter2'. // int instanceMethodAndSetter2() => 1; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:75:12: Context: Conflicting setter 'instanceMethodAndSetter2'. +// void set instanceMethodAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:83:5: Error: The method 'instanceMethod' isn't defined for the class 'int'. // Try correcting the name to the name of an existing method, or defining a method named 'instanceMethod'. diff --git a/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.outline.expect b/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.outline.expect index a7db4b32372d..506deb992240 100644 --- a/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.outline.expect +++ b/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.outline.expect @@ -85,6 +85,34 @@ library; // int instanceField = 1; // ^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:26:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter1'. +// void set instanceFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:25:7: Context: Field 'instanceFieldAndSetter1' with the implicit setter. +// int instanceFieldAndSetter1 = 1; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:33:7: Error: Conflicts with setter 'instanceFieldAndSetter2'. +// int instanceFieldAndSetter2 = 1; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:30:12: Context: Conflicting setter 'instanceFieldAndSetter2'. +// void set instanceFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:36:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter1'. +// void set instanceLateFinalFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:35:18: Context: Field 'instanceLateFinalFieldAndSetter1' with the implicit setter. +// late final int instanceLateFinalFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:43:18: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter2'. +// late final int instanceLateFinalFieldAndSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:40:12: Context: Conflicting setter 'instanceLateFinalFieldAndSetter2'. +// void set instanceLateFinalFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:46:13: Error: 'instanceDuplicateFieldAndSetter' is already declared in this scope. // final int instanceDuplicateFieldAndSetter = 2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -113,53 +141,19 @@ library; // void set instanceDuplicateFieldAndDuplicateSetter(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:26:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter1'. -// void set instanceFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:25:7: Error: Conflicts with setter 'instanceFieldAndSetter1'. -// int instanceFieldAndSetter1 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:30:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter2'. -// void set instanceFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:33:7: Error: Conflicts with setter 'instanceFieldAndSetter2'. -// int instanceFieldAndSetter2 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:36:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter1'. -// void set instanceLateFinalFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:35:18: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter1'. -// late final int instanceLateFinalFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:40:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter2'. -// void set instanceLateFinalFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:43:18: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter2'. -// late final int instanceLateFinalFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:71:12: Error: Conflicts with member 'instanceMethodAndSetter1'. +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:71:12: Error: The setter conflicts with declaration 'instanceMethodAndSetter1'. // void set instanceMethodAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:70:7: Error: Conflicts with setter 'instanceMethodAndSetter1'. +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:70:7: Context: Conflicting declaration 'instanceMethodAndSetter1'. // int instanceMethodAndSetter1() => 1; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:75:12: Error: Conflicts with member 'instanceMethodAndSetter2'. -// void set instanceMethodAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:78:7: Error: Conflicts with setter 'instanceMethodAndSetter2'. +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:78:7: Error: The declaration conflicts with setter 'instanceMethodAndSetter2'. // int instanceMethodAndSetter2() => 1; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:75:12: Context: Conflicting setter 'instanceMethodAndSetter2'. +// void set instanceMethodAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^ // import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.transformed.expect index 6767d6b6f81a..0c9bbc4ecdfc 100644 --- a/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.transformed.expect @@ -85,6 +85,34 @@ library; // int instanceField = 1; // ^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:26:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter1'. +// void set instanceFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:25:7: Context: Field 'instanceFieldAndSetter1' with the implicit setter. +// int instanceFieldAndSetter1 = 1; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:33:7: Error: Conflicts with setter 'instanceFieldAndSetter2'. +// int instanceFieldAndSetter2 = 1; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:30:12: Context: Conflicting setter 'instanceFieldAndSetter2'. +// void set instanceFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:36:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter1'. +// void set instanceLateFinalFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:35:18: Context: Field 'instanceLateFinalFieldAndSetter1' with the implicit setter. +// late final int instanceLateFinalFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:43:18: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter2'. +// late final int instanceLateFinalFieldAndSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:40:12: Context: Conflicting setter 'instanceLateFinalFieldAndSetter2'. +// void set instanceLateFinalFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:46:13: Error: 'instanceDuplicateFieldAndSetter' is already declared in this scope. // final int instanceDuplicateFieldAndSetter = 2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -113,53 +141,19 @@ library; // void set instanceDuplicateFieldAndDuplicateSetter(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:26:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter1'. -// void set instanceFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:25:7: Error: Conflicts with setter 'instanceFieldAndSetter1'. -// int instanceFieldAndSetter1 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:30:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter2'. -// void set instanceFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:33:7: Error: Conflicts with setter 'instanceFieldAndSetter2'. -// int instanceFieldAndSetter2 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:36:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter1'. -// void set instanceLateFinalFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:35:18: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter1'. -// late final int instanceLateFinalFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:40:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter2'. -// void set instanceLateFinalFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:43:18: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter2'. -// late final int instanceLateFinalFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:71:12: Error: Conflicts with member 'instanceMethodAndSetter1'. +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:71:12: Error: The setter conflicts with declaration 'instanceMethodAndSetter1'. // void set instanceMethodAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:70:7: Error: Conflicts with setter 'instanceMethodAndSetter1'. +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:70:7: Context: Conflicting declaration 'instanceMethodAndSetter1'. // int instanceMethodAndSetter1() => 1; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:75:12: Error: Conflicts with member 'instanceMethodAndSetter2'. -// void set instanceMethodAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:78:7: Error: Conflicts with setter 'instanceMethodAndSetter2'. +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:78:7: Error: The declaration conflicts with setter 'instanceMethodAndSetter2'. // int instanceMethodAndSetter2() => 1; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:75:12: Context: Conflicting setter 'instanceMethodAndSetter2'. +// void set instanceMethodAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:83:5: Error: The method 'instanceMethod' isn't defined for the class 'int'. // Try correcting the name to the name of an existing method, or defining a method named 'instanceMethod'. diff --git a/pkg/front_end/testcases/nnbd/duplicates_static.dart.strong.expect b/pkg/front_end/testcases/nnbd/duplicates_static.dart.strong.expect index ff3b447d1d32..8d6029954e98 100644 --- a/pkg/front_end/testcases/nnbd/duplicates_static.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/duplicates_static.dart.strong.expect @@ -30,6 +30,34 @@ library; // static int staticField = 1; // ^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/duplicates_static.dart:26:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter1'. +// static void set staticFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static.dart:25:14: Context: Field 'staticFieldAndSetter1' with the implicit setter. +// static int staticFieldAndSetter1 = 1; +// ^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_static.dart:34:14: Error: Conflicts with setter 'staticFieldAndSetter2'. +// static int staticFieldAndSetter2 = 1; +// ^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static.dart:30:19: Context: Conflicting setter 'staticFieldAndSetter2'. +// static void set staticFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_static.dart:37:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter1'. +// static void set staticLateFinalFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static.dart:36:25: Context: Field 'staticLateFinalFieldAndSetter1' with the implicit setter. +// static late final int staticLateFinalFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_static.dart:45:25: Error: Conflicts with setter 'staticLateFinalFieldAndSetter2'. +// static late final int staticLateFinalFieldAndSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static.dart:41:19: Context: Conflicting setter 'staticLateFinalFieldAndSetter2'. +// static void set staticLateFinalFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/duplicates_static.dart:48:20: Error: 'staticDuplicateFieldAndSetter' is already declared in this scope. // static final int staticDuplicateFieldAndSetter = 2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -58,49 +86,17 @@ library; // static void set staticDuplicateFieldAndDuplicateSetter(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_static.dart:26:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter1'. -// static void set staticFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:25:14: Error: Conflicts with setter 'staticFieldAndSetter1'. -// static int staticFieldAndSetter1 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:30:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter2'. -// static void set staticFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:34:14: Error: Conflicts with setter 'staticFieldAndSetter2'. -// static int staticFieldAndSetter2 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:37:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter1'. -// static void set staticLateFinalFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:36:25: Error: Conflicts with setter 'staticLateFinalFieldAndSetter1'. -// static late final int staticLateFinalFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:41:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter2'. -// static void set staticLateFinalFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:45:25: Error: Conflicts with setter 'staticLateFinalFieldAndSetter2'. -// static late final int staticLateFinalFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:73:19: Error: 'staticMethodAndSetter1' is already declared in this scope. +// pkg/front_end/testcases/nnbd/duplicates_static.dart:73:19: Error: The setter conflicts with declaration 'staticMethodAndSetter1'. // static void set staticMethodAndSetter1(int value) { // ^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/duplicates_static.dart:72:14: Context: Previous declaration of 'staticMethodAndSetter1'. +// pkg/front_end/testcases/nnbd/duplicates_static.dart:72:14: Context: Conflicting declaration 'staticMethodAndSetter1'. // static int staticMethodAndSetter1() => 1; // ^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_static.dart:81:14: Error: 'staticMethodAndSetter2' is already declared in this scope. +// pkg/front_end/testcases/nnbd/duplicates_static.dart:81:14: Error: The declaration conflicts with setter 'staticMethodAndSetter2'. // static int staticMethodAndSetter2() => 1; // ^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/duplicates_static.dart:77:19: Context: Previous declaration of 'staticMethodAndSetter2'. +// pkg/front_end/testcases/nnbd/duplicates_static.dart:77:19: Context: Conflicting setter 'staticMethodAndSetter2'. // static void set staticMethodAndSetter2(int value) { // ^^^^^^^^^^^^^^^^^^^^^^ // diff --git a/pkg/front_end/testcases/nnbd/duplicates_static.dart.strong.modular.expect b/pkg/front_end/testcases/nnbd/duplicates_static.dart.strong.modular.expect index ff3b447d1d32..8d6029954e98 100644 --- a/pkg/front_end/testcases/nnbd/duplicates_static.dart.strong.modular.expect +++ b/pkg/front_end/testcases/nnbd/duplicates_static.dart.strong.modular.expect @@ -30,6 +30,34 @@ library; // static int staticField = 1; // ^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/duplicates_static.dart:26:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter1'. +// static void set staticFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static.dart:25:14: Context: Field 'staticFieldAndSetter1' with the implicit setter. +// static int staticFieldAndSetter1 = 1; +// ^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_static.dart:34:14: Error: Conflicts with setter 'staticFieldAndSetter2'. +// static int staticFieldAndSetter2 = 1; +// ^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static.dart:30:19: Context: Conflicting setter 'staticFieldAndSetter2'. +// static void set staticFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_static.dart:37:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter1'. +// static void set staticLateFinalFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static.dart:36:25: Context: Field 'staticLateFinalFieldAndSetter1' with the implicit setter. +// static late final int staticLateFinalFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_static.dart:45:25: Error: Conflicts with setter 'staticLateFinalFieldAndSetter2'. +// static late final int staticLateFinalFieldAndSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static.dart:41:19: Context: Conflicting setter 'staticLateFinalFieldAndSetter2'. +// static void set staticLateFinalFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/duplicates_static.dart:48:20: Error: 'staticDuplicateFieldAndSetter' is already declared in this scope. // static final int staticDuplicateFieldAndSetter = 2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -58,49 +86,17 @@ library; // static void set staticDuplicateFieldAndDuplicateSetter(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_static.dart:26:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter1'. -// static void set staticFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:25:14: Error: Conflicts with setter 'staticFieldAndSetter1'. -// static int staticFieldAndSetter1 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:30:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter2'. -// static void set staticFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:34:14: Error: Conflicts with setter 'staticFieldAndSetter2'. -// static int staticFieldAndSetter2 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:37:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter1'. -// static void set staticLateFinalFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:36:25: Error: Conflicts with setter 'staticLateFinalFieldAndSetter1'. -// static late final int staticLateFinalFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:41:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter2'. -// static void set staticLateFinalFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:45:25: Error: Conflicts with setter 'staticLateFinalFieldAndSetter2'. -// static late final int staticLateFinalFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:73:19: Error: 'staticMethodAndSetter1' is already declared in this scope. +// pkg/front_end/testcases/nnbd/duplicates_static.dart:73:19: Error: The setter conflicts with declaration 'staticMethodAndSetter1'. // static void set staticMethodAndSetter1(int value) { // ^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/duplicates_static.dart:72:14: Context: Previous declaration of 'staticMethodAndSetter1'. +// pkg/front_end/testcases/nnbd/duplicates_static.dart:72:14: Context: Conflicting declaration 'staticMethodAndSetter1'. // static int staticMethodAndSetter1() => 1; // ^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_static.dart:81:14: Error: 'staticMethodAndSetter2' is already declared in this scope. +// pkg/front_end/testcases/nnbd/duplicates_static.dart:81:14: Error: The declaration conflicts with setter 'staticMethodAndSetter2'. // static int staticMethodAndSetter2() => 1; // ^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/duplicates_static.dart:77:19: Context: Previous declaration of 'staticMethodAndSetter2'. +// pkg/front_end/testcases/nnbd/duplicates_static.dart:77:19: Context: Conflicting setter 'staticMethodAndSetter2'. // static void set staticMethodAndSetter2(int value) { // ^^^^^^^^^^^^^^^^^^^^^^ // diff --git a/pkg/front_end/testcases/nnbd/duplicates_static.dart.strong.outline.expect b/pkg/front_end/testcases/nnbd/duplicates_static.dart.strong.outline.expect index 42fdd3d3b649..ea682a4819f6 100644 --- a/pkg/front_end/testcases/nnbd/duplicates_static.dart.strong.outline.expect +++ b/pkg/front_end/testcases/nnbd/duplicates_static.dart.strong.outline.expect @@ -30,6 +30,34 @@ library; // static int staticField = 1; // ^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/duplicates_static.dart:26:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter1'. +// static void set staticFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static.dart:25:14: Context: Field 'staticFieldAndSetter1' with the implicit setter. +// static int staticFieldAndSetter1 = 1; +// ^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_static.dart:34:14: Error: Conflicts with setter 'staticFieldAndSetter2'. +// static int staticFieldAndSetter2 = 1; +// ^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static.dart:30:19: Context: Conflicting setter 'staticFieldAndSetter2'. +// static void set staticFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_static.dart:37:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter1'. +// static void set staticLateFinalFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static.dart:36:25: Context: Field 'staticLateFinalFieldAndSetter1' with the implicit setter. +// static late final int staticLateFinalFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_static.dart:45:25: Error: Conflicts with setter 'staticLateFinalFieldAndSetter2'. +// static late final int staticLateFinalFieldAndSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static.dart:41:19: Context: Conflicting setter 'staticLateFinalFieldAndSetter2'. +// static void set staticLateFinalFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/duplicates_static.dart:48:20: Error: 'staticDuplicateFieldAndSetter' is already declared in this scope. // static final int staticDuplicateFieldAndSetter = 2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -58,49 +86,17 @@ library; // static void set staticDuplicateFieldAndDuplicateSetter(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_static.dart:26:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter1'. -// static void set staticFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:25:14: Error: Conflicts with setter 'staticFieldAndSetter1'. -// static int staticFieldAndSetter1 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:30:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter2'. -// static void set staticFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:34:14: Error: Conflicts with setter 'staticFieldAndSetter2'. -// static int staticFieldAndSetter2 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:37:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter1'. -// static void set staticLateFinalFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:36:25: Error: Conflicts with setter 'staticLateFinalFieldAndSetter1'. -// static late final int staticLateFinalFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:41:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter2'. -// static void set staticLateFinalFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:45:25: Error: Conflicts with setter 'staticLateFinalFieldAndSetter2'. -// static late final int staticLateFinalFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:73:19: Error: 'staticMethodAndSetter1' is already declared in this scope. +// pkg/front_end/testcases/nnbd/duplicates_static.dart:73:19: Error: The setter conflicts with declaration 'staticMethodAndSetter1'. // static void set staticMethodAndSetter1(int value) { // ^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/duplicates_static.dart:72:14: Context: Previous declaration of 'staticMethodAndSetter1'. +// pkg/front_end/testcases/nnbd/duplicates_static.dart:72:14: Context: Conflicting declaration 'staticMethodAndSetter1'. // static int staticMethodAndSetter1() => 1; // ^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_static.dart:81:14: Error: 'staticMethodAndSetter2' is already declared in this scope. +// pkg/front_end/testcases/nnbd/duplicates_static.dart:81:14: Error: The declaration conflicts with setter 'staticMethodAndSetter2'. // static int staticMethodAndSetter2() => 1; // ^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/duplicates_static.dart:77:19: Context: Previous declaration of 'staticMethodAndSetter2'. +// pkg/front_end/testcases/nnbd/duplicates_static.dart:77:19: Context: Conflicting setter 'staticMethodAndSetter2'. // static void set staticMethodAndSetter2(int value) { // ^^^^^^^^^^^^^^^^^^^^^^ // diff --git a/pkg/front_end/testcases/nnbd/duplicates_static.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/duplicates_static.dart.strong.transformed.expect index ff3b447d1d32..8d6029954e98 100644 --- a/pkg/front_end/testcases/nnbd/duplicates_static.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/duplicates_static.dart.strong.transformed.expect @@ -30,6 +30,34 @@ library; // static int staticField = 1; // ^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/duplicates_static.dart:26:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter1'. +// static void set staticFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static.dart:25:14: Context: Field 'staticFieldAndSetter1' with the implicit setter. +// static int staticFieldAndSetter1 = 1; +// ^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_static.dart:34:14: Error: Conflicts with setter 'staticFieldAndSetter2'. +// static int staticFieldAndSetter2 = 1; +// ^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static.dart:30:19: Context: Conflicting setter 'staticFieldAndSetter2'. +// static void set staticFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_static.dart:37:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter1'. +// static void set staticLateFinalFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static.dart:36:25: Context: Field 'staticLateFinalFieldAndSetter1' with the implicit setter. +// static late final int staticLateFinalFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_static.dart:45:25: Error: Conflicts with setter 'staticLateFinalFieldAndSetter2'. +// static late final int staticLateFinalFieldAndSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static.dart:41:19: Context: Conflicting setter 'staticLateFinalFieldAndSetter2'. +// static void set staticLateFinalFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/duplicates_static.dart:48:20: Error: 'staticDuplicateFieldAndSetter' is already declared in this scope. // static final int staticDuplicateFieldAndSetter = 2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -58,49 +86,17 @@ library; // static void set staticDuplicateFieldAndDuplicateSetter(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_static.dart:26:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter1'. -// static void set staticFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:25:14: Error: Conflicts with setter 'staticFieldAndSetter1'. -// static int staticFieldAndSetter1 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:30:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter2'. -// static void set staticFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:34:14: Error: Conflicts with setter 'staticFieldAndSetter2'. -// static int staticFieldAndSetter2 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:37:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter1'. -// static void set staticLateFinalFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:36:25: Error: Conflicts with setter 'staticLateFinalFieldAndSetter1'. -// static late final int staticLateFinalFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:41:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter2'. -// static void set staticLateFinalFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:45:25: Error: Conflicts with setter 'staticLateFinalFieldAndSetter2'. -// static late final int staticLateFinalFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static.dart:73:19: Error: 'staticMethodAndSetter1' is already declared in this scope. +// pkg/front_end/testcases/nnbd/duplicates_static.dart:73:19: Error: The setter conflicts with declaration 'staticMethodAndSetter1'. // static void set staticMethodAndSetter1(int value) { // ^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/duplicates_static.dart:72:14: Context: Previous declaration of 'staticMethodAndSetter1'. +// pkg/front_end/testcases/nnbd/duplicates_static.dart:72:14: Context: Conflicting declaration 'staticMethodAndSetter1'. // static int staticMethodAndSetter1() => 1; // ^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_static.dart:81:14: Error: 'staticMethodAndSetter2' is already declared in this scope. +// pkg/front_end/testcases/nnbd/duplicates_static.dart:81:14: Error: The declaration conflicts with setter 'staticMethodAndSetter2'. // static int staticMethodAndSetter2() => 1; // ^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/duplicates_static.dart:77:19: Context: Previous declaration of 'staticMethodAndSetter2'. +// pkg/front_end/testcases/nnbd/duplicates_static.dart:77:19: Context: Conflicting setter 'staticMethodAndSetter2'. // static void set staticMethodAndSetter2(int value) { // ^^^^^^^^^^^^^^^^^^^^^^ // diff --git a/pkg/front_end/testcases/nnbd/duplicates_static_extension.dart.strong.expect b/pkg/front_end/testcases/nnbd/duplicates_static_extension.dart.strong.expect index b8a96ddc5be1..60ba2933c974 100644 --- a/pkg/front_end/testcases/nnbd/duplicates_static_extension.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/duplicates_static_extension.dart.strong.expect @@ -30,6 +30,34 @@ library; // static int staticField = 1; // ^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:26:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter1'. +// static void set staticFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:25:14: Context: Field 'staticFieldAndSetter1' with the implicit setter. +// static int staticFieldAndSetter1 = 1; +// ^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:34:14: Error: Conflicts with setter 'staticFieldAndSetter2'. +// static int staticFieldAndSetter2 = 1; +// ^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:30:19: Context: Conflicting setter 'staticFieldAndSetter2'. +// static void set staticFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:37:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter1'. +// static void set staticLateFinalFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:36:25: Context: Field 'staticLateFinalFieldAndSetter1' with the implicit setter. +// static late final int staticLateFinalFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:45:25: Error: Conflicts with setter 'staticLateFinalFieldAndSetter2'. +// static late final int staticLateFinalFieldAndSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:41:19: Context: Conflicting setter 'staticLateFinalFieldAndSetter2'. +// static void set staticLateFinalFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:48:20: Error: 'staticDuplicateFieldAndSetter' is already declared in this scope. // static final int staticDuplicateFieldAndSetter = 2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -58,53 +86,19 @@ library; // static void set staticDuplicateFieldAndDuplicateSetter(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:26:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter1'. -// static void set staticFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:25:14: Error: Conflicts with setter 'staticFieldAndSetter1'. -// static int staticFieldAndSetter1 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:30:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter2'. -// static void set staticFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:34:14: Error: Conflicts with setter 'staticFieldAndSetter2'. -// static int staticFieldAndSetter2 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:37:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter1'. -// static void set staticLateFinalFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:36:25: Error: Conflicts with setter 'staticLateFinalFieldAndSetter1'. -// static late final int staticLateFinalFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:41:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter2'. -// static void set staticLateFinalFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:45:25: Error: Conflicts with setter 'staticLateFinalFieldAndSetter2'. -// static late final int staticLateFinalFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:73:19: Error: Conflicts with member 'staticMethodAndSetter1'. +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:73:19: Error: The setter conflicts with declaration 'staticMethodAndSetter1'. // static void set staticMethodAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:72:14: Error: Conflicts with setter 'staticMethodAndSetter1'. +// ^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:72:14: Context: Conflicting declaration 'staticMethodAndSetter1'. // static int staticMethodAndSetter1() => 1; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:77:19: Error: Conflicts with member 'staticMethodAndSetter2'. -// static void set staticMethodAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:81:14: Error: Conflicts with setter 'staticMethodAndSetter2'. +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:81:14: Error: The declaration conflicts with setter 'staticMethodAndSetter2'. // static int staticMethodAndSetter2() => 1; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:77:19: Context: Conflicting setter 'staticMethodAndSetter2'. +// static void set staticMethodAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:85:13: Error: Can't use 'staticMethod' because it is declared more than once. // Extension.staticMethod(); diff --git a/pkg/front_end/testcases/nnbd/duplicates_static_extension.dart.strong.modular.expect b/pkg/front_end/testcases/nnbd/duplicates_static_extension.dart.strong.modular.expect index b8a96ddc5be1..60ba2933c974 100644 --- a/pkg/front_end/testcases/nnbd/duplicates_static_extension.dart.strong.modular.expect +++ b/pkg/front_end/testcases/nnbd/duplicates_static_extension.dart.strong.modular.expect @@ -30,6 +30,34 @@ library; // static int staticField = 1; // ^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:26:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter1'. +// static void set staticFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:25:14: Context: Field 'staticFieldAndSetter1' with the implicit setter. +// static int staticFieldAndSetter1 = 1; +// ^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:34:14: Error: Conflicts with setter 'staticFieldAndSetter2'. +// static int staticFieldAndSetter2 = 1; +// ^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:30:19: Context: Conflicting setter 'staticFieldAndSetter2'. +// static void set staticFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:37:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter1'. +// static void set staticLateFinalFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:36:25: Context: Field 'staticLateFinalFieldAndSetter1' with the implicit setter. +// static late final int staticLateFinalFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:45:25: Error: Conflicts with setter 'staticLateFinalFieldAndSetter2'. +// static late final int staticLateFinalFieldAndSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:41:19: Context: Conflicting setter 'staticLateFinalFieldAndSetter2'. +// static void set staticLateFinalFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:48:20: Error: 'staticDuplicateFieldAndSetter' is already declared in this scope. // static final int staticDuplicateFieldAndSetter = 2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -58,53 +86,19 @@ library; // static void set staticDuplicateFieldAndDuplicateSetter(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:26:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter1'. -// static void set staticFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:25:14: Error: Conflicts with setter 'staticFieldAndSetter1'. -// static int staticFieldAndSetter1 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:30:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter2'. -// static void set staticFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:34:14: Error: Conflicts with setter 'staticFieldAndSetter2'. -// static int staticFieldAndSetter2 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:37:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter1'. -// static void set staticLateFinalFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:36:25: Error: Conflicts with setter 'staticLateFinalFieldAndSetter1'. -// static late final int staticLateFinalFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:41:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter2'. -// static void set staticLateFinalFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:45:25: Error: Conflicts with setter 'staticLateFinalFieldAndSetter2'. -// static late final int staticLateFinalFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:73:19: Error: Conflicts with member 'staticMethodAndSetter1'. +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:73:19: Error: The setter conflicts with declaration 'staticMethodAndSetter1'. // static void set staticMethodAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:72:14: Error: Conflicts with setter 'staticMethodAndSetter1'. +// ^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:72:14: Context: Conflicting declaration 'staticMethodAndSetter1'. // static int staticMethodAndSetter1() => 1; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:77:19: Error: Conflicts with member 'staticMethodAndSetter2'. -// static void set staticMethodAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:81:14: Error: Conflicts with setter 'staticMethodAndSetter2'. +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:81:14: Error: The declaration conflicts with setter 'staticMethodAndSetter2'. // static int staticMethodAndSetter2() => 1; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:77:19: Context: Conflicting setter 'staticMethodAndSetter2'. +// static void set staticMethodAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:85:13: Error: Can't use 'staticMethod' because it is declared more than once. // Extension.staticMethod(); diff --git a/pkg/front_end/testcases/nnbd/duplicates_static_extension.dart.strong.outline.expect b/pkg/front_end/testcases/nnbd/duplicates_static_extension.dart.strong.outline.expect index 3602c2021455..3ced53ffcfde 100644 --- a/pkg/front_end/testcases/nnbd/duplicates_static_extension.dart.strong.outline.expect +++ b/pkg/front_end/testcases/nnbd/duplicates_static_extension.dart.strong.outline.expect @@ -30,6 +30,34 @@ library; // static int staticField = 1; // ^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:26:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter1'. +// static void set staticFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:25:14: Context: Field 'staticFieldAndSetter1' with the implicit setter. +// static int staticFieldAndSetter1 = 1; +// ^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:34:14: Error: Conflicts with setter 'staticFieldAndSetter2'. +// static int staticFieldAndSetter2 = 1; +// ^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:30:19: Context: Conflicting setter 'staticFieldAndSetter2'. +// static void set staticFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:37:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter1'. +// static void set staticLateFinalFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:36:25: Context: Field 'staticLateFinalFieldAndSetter1' with the implicit setter. +// static late final int staticLateFinalFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:45:25: Error: Conflicts with setter 'staticLateFinalFieldAndSetter2'. +// static late final int staticLateFinalFieldAndSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:41:19: Context: Conflicting setter 'staticLateFinalFieldAndSetter2'. +// static void set staticLateFinalFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:48:20: Error: 'staticDuplicateFieldAndSetter' is already declared in this scope. // static final int staticDuplicateFieldAndSetter = 2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -58,53 +86,19 @@ library; // static void set staticDuplicateFieldAndDuplicateSetter(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:26:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter1'. -// static void set staticFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:25:14: Error: Conflicts with setter 'staticFieldAndSetter1'. -// static int staticFieldAndSetter1 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:30:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter2'. -// static void set staticFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:34:14: Error: Conflicts with setter 'staticFieldAndSetter2'. -// static int staticFieldAndSetter2 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:37:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter1'. -// static void set staticLateFinalFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:36:25: Error: Conflicts with setter 'staticLateFinalFieldAndSetter1'. -// static late final int staticLateFinalFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:41:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter2'. -// static void set staticLateFinalFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:45:25: Error: Conflicts with setter 'staticLateFinalFieldAndSetter2'. -// static late final int staticLateFinalFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:73:19: Error: Conflicts with member 'staticMethodAndSetter1'. +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:73:19: Error: The setter conflicts with declaration 'staticMethodAndSetter1'. // static void set staticMethodAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:72:14: Error: Conflicts with setter 'staticMethodAndSetter1'. +// ^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:72:14: Context: Conflicting declaration 'staticMethodAndSetter1'. // static int staticMethodAndSetter1() => 1; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:77:19: Error: Conflicts with member 'staticMethodAndSetter2'. -// static void set staticMethodAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:81:14: Error: Conflicts with setter 'staticMethodAndSetter2'. +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:81:14: Error: The declaration conflicts with setter 'staticMethodAndSetter2'. // static int staticMethodAndSetter2() => 1; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:77:19: Context: Conflicting setter 'staticMethodAndSetter2'. +// static void set staticMethodAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^ // import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/duplicates_static_extension.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/duplicates_static_extension.dart.strong.transformed.expect index b8a96ddc5be1..60ba2933c974 100644 --- a/pkg/front_end/testcases/nnbd/duplicates_static_extension.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/duplicates_static_extension.dart.strong.transformed.expect @@ -30,6 +30,34 @@ library; // static int staticField = 1; // ^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:26:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter1'. +// static void set staticFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:25:14: Context: Field 'staticFieldAndSetter1' with the implicit setter. +// static int staticFieldAndSetter1 = 1; +// ^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:34:14: Error: Conflicts with setter 'staticFieldAndSetter2'. +// static int staticFieldAndSetter2 = 1; +// ^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:30:19: Context: Conflicting setter 'staticFieldAndSetter2'. +// static void set staticFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:37:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter1'. +// static void set staticLateFinalFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:36:25: Context: Field 'staticLateFinalFieldAndSetter1' with the implicit setter. +// static late final int staticLateFinalFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:45:25: Error: Conflicts with setter 'staticLateFinalFieldAndSetter2'. +// static late final int staticLateFinalFieldAndSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:41:19: Context: Conflicting setter 'staticLateFinalFieldAndSetter2'. +// static void set staticLateFinalFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:48:20: Error: 'staticDuplicateFieldAndSetter' is already declared in this scope. // static final int staticDuplicateFieldAndSetter = 2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -58,53 +86,19 @@ library; // static void set staticDuplicateFieldAndDuplicateSetter(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:26:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter1'. -// static void set staticFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:25:14: Error: Conflicts with setter 'staticFieldAndSetter1'. -// static int staticFieldAndSetter1 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:30:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter2'. -// static void set staticFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:34:14: Error: Conflicts with setter 'staticFieldAndSetter2'. -// static int staticFieldAndSetter2 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:37:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter1'. -// static void set staticLateFinalFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:36:25: Error: Conflicts with setter 'staticLateFinalFieldAndSetter1'. -// static late final int staticLateFinalFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:41:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter2'. -// static void set staticLateFinalFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:45:25: Error: Conflicts with setter 'staticLateFinalFieldAndSetter2'. -// static late final int staticLateFinalFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:73:19: Error: Conflicts with member 'staticMethodAndSetter1'. +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:73:19: Error: The setter conflicts with declaration 'staticMethodAndSetter1'. // static void set staticMethodAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:72:14: Error: Conflicts with setter 'staticMethodAndSetter1'. +// ^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:72:14: Context: Conflicting declaration 'staticMethodAndSetter1'. // static int staticMethodAndSetter1() => 1; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:77:19: Error: Conflicts with member 'staticMethodAndSetter2'. -// static void set staticMethodAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:81:14: Error: Conflicts with setter 'staticMethodAndSetter2'. +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:81:14: Error: The declaration conflicts with setter 'staticMethodAndSetter2'. // static int staticMethodAndSetter2() => 1; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:77:19: Context: Conflicting setter 'staticMethodAndSetter2'. +// static void set staticMethodAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/duplicates_static_extension.dart:85:13: Error: Can't use 'staticMethod' because it is declared more than once. // Extension.staticMethod(); diff --git a/pkg/front_end/testcases/nnbd/duplicates_toplevel.dart.strong.expect b/pkg/front_end/testcases/nnbd/duplicates_toplevel.dart.strong.expect index bb419cdbdc96..0fc3bde2c440 100644 --- a/pkg/front_end/testcases/nnbd/duplicates_toplevel.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/duplicates_toplevel.dart.strong.expect @@ -30,6 +30,34 @@ library; // int topLevelField = 1; // ^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:27:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndSetter1'. +// void set topLevelFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:26:5: Context: Field 'topLevelFieldAndSetter1' with the implicit setter. +// int topLevelFieldAndSetter1 = 1; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:35:5: Error: Conflicts with setter 'topLevelFieldAndSetter2'. +// int topLevelFieldAndSetter2 = 1; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:31:10: Context: Conflicting setter 'topLevelFieldAndSetter2'. +// void set topLevelFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:38:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndSetter1'. +// void set topLevelLateFinalFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:37:16: Context: Field 'topLevelLateFinalFieldAndSetter1' with the implicit setter. +// late final int topLevelLateFinalFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:46:16: Error: Conflicts with setter 'topLevelLateFinalFieldAndSetter2'. +// late final int topLevelLateFinalFieldAndSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:42:10: Context: Conflicting setter 'topLevelLateFinalFieldAndSetter2'. +// void set topLevelLateFinalFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:49:11: Error: 'topLevelDuplicateFieldAndSetter' is already declared in this scope. // final int topLevelDuplicateFieldAndSetter = 2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -58,53 +86,19 @@ library; // void set topLevelDuplicateFieldAndDuplicateSetter(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:27:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndSetter1'. -// void set topLevelFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:26:5: Error: Conflicts with setter 'topLevelFieldAndSetter1'. -// int topLevelFieldAndSetter1 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:31:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndSetter2'. -// void set topLevelFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:35:5: Error: Conflicts with setter 'topLevelFieldAndSetter2'. -// int topLevelFieldAndSetter2 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:38:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndSetter1'. -// void set topLevelLateFinalFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:37:16: Error: Conflicts with setter 'topLevelLateFinalFieldAndSetter1'. -// late final int topLevelLateFinalFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:42:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndSetter2'. -// void set topLevelLateFinalFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:46:16: Error: Conflicts with setter 'topLevelLateFinalFieldAndSetter2'. -// late final int topLevelLateFinalFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:74:10: Error: Conflicts with member 'topLevelMethodAndSetter1'. +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:74:10: Error: The setter conflicts with declaration 'topLevelMethodAndSetter1'. // void set topLevelMethodAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:73:5: Error: Conflicts with setter 'topLevelMethodAndSetter1'. +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:73:5: Context: Conflicting declaration 'topLevelMethodAndSetter1'. // int topLevelMethodAndSetter1() => 1; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:78:10: Error: Conflicts with member 'topLevelMethodAndSetter2'. -// void set topLevelMethodAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:82:5: Error: Conflicts with setter 'topLevelMethodAndSetter2'. +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:82:5: Error: The declaration conflicts with setter 'topLevelMethodAndSetter2'. // int topLevelMethodAndSetter2() => 1; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:78:10: Context: Conflicting setter 'topLevelMethodAndSetter2'. +// void set topLevelMethodAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:84:13: Error: Can't use 'topLevelMethod' because it is declared more than once. // var field = topLevelMethod; diff --git a/pkg/front_end/testcases/nnbd/duplicates_toplevel.dart.strong.modular.expect b/pkg/front_end/testcases/nnbd/duplicates_toplevel.dart.strong.modular.expect index bb419cdbdc96..0fc3bde2c440 100644 --- a/pkg/front_end/testcases/nnbd/duplicates_toplevel.dart.strong.modular.expect +++ b/pkg/front_end/testcases/nnbd/duplicates_toplevel.dart.strong.modular.expect @@ -30,6 +30,34 @@ library; // int topLevelField = 1; // ^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:27:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndSetter1'. +// void set topLevelFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:26:5: Context: Field 'topLevelFieldAndSetter1' with the implicit setter. +// int topLevelFieldAndSetter1 = 1; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:35:5: Error: Conflicts with setter 'topLevelFieldAndSetter2'. +// int topLevelFieldAndSetter2 = 1; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:31:10: Context: Conflicting setter 'topLevelFieldAndSetter2'. +// void set topLevelFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:38:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndSetter1'. +// void set topLevelLateFinalFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:37:16: Context: Field 'topLevelLateFinalFieldAndSetter1' with the implicit setter. +// late final int topLevelLateFinalFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:46:16: Error: Conflicts with setter 'topLevelLateFinalFieldAndSetter2'. +// late final int topLevelLateFinalFieldAndSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:42:10: Context: Conflicting setter 'topLevelLateFinalFieldAndSetter2'. +// void set topLevelLateFinalFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:49:11: Error: 'topLevelDuplicateFieldAndSetter' is already declared in this scope. // final int topLevelDuplicateFieldAndSetter = 2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -58,53 +86,19 @@ library; // void set topLevelDuplicateFieldAndDuplicateSetter(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:27:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndSetter1'. -// void set topLevelFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:26:5: Error: Conflicts with setter 'topLevelFieldAndSetter1'. -// int topLevelFieldAndSetter1 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:31:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndSetter2'. -// void set topLevelFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:35:5: Error: Conflicts with setter 'topLevelFieldAndSetter2'. -// int topLevelFieldAndSetter2 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:38:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndSetter1'. -// void set topLevelLateFinalFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:37:16: Error: Conflicts with setter 'topLevelLateFinalFieldAndSetter1'. -// late final int topLevelLateFinalFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:42:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndSetter2'. -// void set topLevelLateFinalFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:46:16: Error: Conflicts with setter 'topLevelLateFinalFieldAndSetter2'. -// late final int topLevelLateFinalFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:74:10: Error: Conflicts with member 'topLevelMethodAndSetter1'. +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:74:10: Error: The setter conflicts with declaration 'topLevelMethodAndSetter1'. // void set topLevelMethodAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:73:5: Error: Conflicts with setter 'topLevelMethodAndSetter1'. +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:73:5: Context: Conflicting declaration 'topLevelMethodAndSetter1'. // int topLevelMethodAndSetter1() => 1; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:78:10: Error: Conflicts with member 'topLevelMethodAndSetter2'. -// void set topLevelMethodAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:82:5: Error: Conflicts with setter 'topLevelMethodAndSetter2'. +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:82:5: Error: The declaration conflicts with setter 'topLevelMethodAndSetter2'. // int topLevelMethodAndSetter2() => 1; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:78:10: Context: Conflicting setter 'topLevelMethodAndSetter2'. +// void set topLevelMethodAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:84:13: Error: Can't use 'topLevelMethod' because it is declared more than once. // var field = topLevelMethod; diff --git a/pkg/front_end/testcases/nnbd/duplicates_toplevel.dart.strong.outline.expect b/pkg/front_end/testcases/nnbd/duplicates_toplevel.dart.strong.outline.expect index a2b2abae0871..89f95c55e7c1 100644 --- a/pkg/front_end/testcases/nnbd/duplicates_toplevel.dart.strong.outline.expect +++ b/pkg/front_end/testcases/nnbd/duplicates_toplevel.dart.strong.outline.expect @@ -30,6 +30,34 @@ library; // int topLevelField = 1; // ^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:27:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndSetter1'. +// void set topLevelFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:26:5: Context: Field 'topLevelFieldAndSetter1' with the implicit setter. +// int topLevelFieldAndSetter1 = 1; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:35:5: Error: Conflicts with setter 'topLevelFieldAndSetter2'. +// int topLevelFieldAndSetter2 = 1; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:31:10: Context: Conflicting setter 'topLevelFieldAndSetter2'. +// void set topLevelFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:38:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndSetter1'. +// void set topLevelLateFinalFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:37:16: Context: Field 'topLevelLateFinalFieldAndSetter1' with the implicit setter. +// late final int topLevelLateFinalFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:46:16: Error: Conflicts with setter 'topLevelLateFinalFieldAndSetter2'. +// late final int topLevelLateFinalFieldAndSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:42:10: Context: Conflicting setter 'topLevelLateFinalFieldAndSetter2'. +// void set topLevelLateFinalFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:49:11: Error: 'topLevelDuplicateFieldAndSetter' is already declared in this scope. // final int topLevelDuplicateFieldAndSetter = 2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -58,53 +86,19 @@ library; // void set topLevelDuplicateFieldAndDuplicateSetter(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:27:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndSetter1'. -// void set topLevelFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:26:5: Error: Conflicts with setter 'topLevelFieldAndSetter1'. -// int topLevelFieldAndSetter1 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:31:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndSetter2'. -// void set topLevelFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:35:5: Error: Conflicts with setter 'topLevelFieldAndSetter2'. -// int topLevelFieldAndSetter2 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:38:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndSetter1'. -// void set topLevelLateFinalFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:37:16: Error: Conflicts with setter 'topLevelLateFinalFieldAndSetter1'. -// late final int topLevelLateFinalFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:42:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndSetter2'. -// void set topLevelLateFinalFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:46:16: Error: Conflicts with setter 'topLevelLateFinalFieldAndSetter2'. -// late final int topLevelLateFinalFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:74:10: Error: Conflicts with member 'topLevelMethodAndSetter1'. +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:74:10: Error: The setter conflicts with declaration 'topLevelMethodAndSetter1'. // void set topLevelMethodAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:73:5: Error: Conflicts with setter 'topLevelMethodAndSetter1'. +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:73:5: Context: Conflicting declaration 'topLevelMethodAndSetter1'. // int topLevelMethodAndSetter1() => 1; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:78:10: Error: Conflicts with member 'topLevelMethodAndSetter2'. -// void set topLevelMethodAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:82:5: Error: Conflicts with setter 'topLevelMethodAndSetter2'. +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:82:5: Error: The declaration conflicts with setter 'topLevelMethodAndSetter2'. // int topLevelMethodAndSetter2() => 1; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:78:10: Context: Conflicting setter 'topLevelMethodAndSetter2'. +// void set topLevelMethodAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:84:13: Error: Can't use 'topLevelMethod' because it is declared more than once. // var field = topLevelMethod; diff --git a/pkg/front_end/testcases/nnbd/duplicates_toplevel.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/duplicates_toplevel.dart.strong.transformed.expect index bb419cdbdc96..0fc3bde2c440 100644 --- a/pkg/front_end/testcases/nnbd/duplicates_toplevel.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/duplicates_toplevel.dart.strong.transformed.expect @@ -30,6 +30,34 @@ library; // int topLevelField = 1; // ^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:27:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndSetter1'. +// void set topLevelFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:26:5: Context: Field 'topLevelFieldAndSetter1' with the implicit setter. +// int topLevelFieldAndSetter1 = 1; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:35:5: Error: Conflicts with setter 'topLevelFieldAndSetter2'. +// int topLevelFieldAndSetter2 = 1; +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:31:10: Context: Conflicting setter 'topLevelFieldAndSetter2'. +// void set topLevelFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:38:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndSetter1'. +// void set topLevelLateFinalFieldAndSetter1(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:37:16: Context: Field 'topLevelLateFinalFieldAndSetter1' with the implicit setter. +// late final int topLevelLateFinalFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:46:16: Error: Conflicts with setter 'topLevelLateFinalFieldAndSetter2'. +// late final int topLevelLateFinalFieldAndSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:42:10: Context: Conflicting setter 'topLevelLateFinalFieldAndSetter2'. +// void set topLevelLateFinalFieldAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:49:11: Error: 'topLevelDuplicateFieldAndSetter' is already declared in this scope. // final int topLevelDuplicateFieldAndSetter = 2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -58,53 +86,19 @@ library; // void set topLevelDuplicateFieldAndDuplicateSetter(int value) { // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:27:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndSetter1'. -// void set topLevelFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:26:5: Error: Conflicts with setter 'topLevelFieldAndSetter1'. -// int topLevelFieldAndSetter1 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:31:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndSetter2'. -// void set topLevelFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:35:5: Error: Conflicts with setter 'topLevelFieldAndSetter2'. -// int topLevelFieldAndSetter2 = 1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:38:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndSetter1'. -// void set topLevelLateFinalFieldAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:37:16: Error: Conflicts with setter 'topLevelLateFinalFieldAndSetter1'. -// late final int topLevelLateFinalFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:42:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndSetter2'. -// void set topLevelLateFinalFieldAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:46:16: Error: Conflicts with setter 'topLevelLateFinalFieldAndSetter2'. -// late final int topLevelLateFinalFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:74:10: Error: Conflicts with member 'topLevelMethodAndSetter1'. +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:74:10: Error: The setter conflicts with declaration 'topLevelMethodAndSetter1'. // void set topLevelMethodAndSetter1(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:73:5: Error: Conflicts with setter 'topLevelMethodAndSetter1'. +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:73:5: Context: Conflicting declaration 'topLevelMethodAndSetter1'. // int topLevelMethodAndSetter1() => 1; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:78:10: Error: Conflicts with member 'topLevelMethodAndSetter2'. -// void set topLevelMethodAndSetter2(int value) { -// ^ -// -// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:82:5: Error: Conflicts with setter 'topLevelMethodAndSetter2'. +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:82:5: Error: The declaration conflicts with setter 'topLevelMethodAndSetter2'. // int topLevelMethodAndSetter2() => 1; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:78:10: Context: Conflicting setter 'topLevelMethodAndSetter2'. +// void set topLevelMethodAndSetter2(int value) { +// ^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/duplicates_toplevel.dart:84:13: Error: Can't use 'topLevelMethod' because it is declared more than once. // var field = topLevelMethod; diff --git a/pkg/front_end/testcases/nnbd/field_setter_conflict.dart.strong.expect b/pkg/front_end/testcases/nnbd/field_setter_conflict.dart.strong.expect index 879240b37cbb..f3c9f5e49e09 100644 --- a/pkg/front_end/testcases/nnbd/field_setter_conflict.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/field_setter_conflict.dart.strong.expect @@ -2,21 +2,19 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/field_setter_conflict.dart:7:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldInPartSetterInMain'. -// void set topLevelFieldInPartSetterInMain(int? value) {} -// ^ -// // pkg/front_end/testcases/nnbd/field_setter_conflict_part.dart:39:6: Error: Conflicts with setter 'topLevelFieldInPartSetterInMain'. // int? topLevelFieldInPartSetterInMain; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_setter_conflict.dart:7:10: Context: Conflicting setter 'topLevelFieldInPartSetterInMain'. +// void set topLevelFieldInPartSetterInMain(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_setter_conflict_part.dart:40:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldInMainSetterInPart'. // void set topLevelFieldInMainSetterInPart(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_setter_conflict.dart:8:6: Error: Conflicts with setter 'topLevelFieldInMainSetterInPart'. +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_setter_conflict.dart:8:6: Context: Field 'topLevelFieldInMainSetterInPart' with the implicit setter. // int? topLevelFieldInMainSetterInPart; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/field_setter_conflict.dart.strong.modular.expect b/pkg/front_end/testcases/nnbd/field_setter_conflict.dart.strong.modular.expect index 879240b37cbb..f3c9f5e49e09 100644 --- a/pkg/front_end/testcases/nnbd/field_setter_conflict.dart.strong.modular.expect +++ b/pkg/front_end/testcases/nnbd/field_setter_conflict.dart.strong.modular.expect @@ -2,21 +2,19 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/field_setter_conflict.dart:7:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldInPartSetterInMain'. -// void set topLevelFieldInPartSetterInMain(int? value) {} -// ^ -// // pkg/front_end/testcases/nnbd/field_setter_conflict_part.dart:39:6: Error: Conflicts with setter 'topLevelFieldInPartSetterInMain'. // int? topLevelFieldInPartSetterInMain; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_setter_conflict.dart:7:10: Context: Conflicting setter 'topLevelFieldInPartSetterInMain'. +// void set topLevelFieldInPartSetterInMain(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_setter_conflict_part.dart:40:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldInMainSetterInPart'. // void set topLevelFieldInMainSetterInPart(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_setter_conflict.dart:8:6: Error: Conflicts with setter 'topLevelFieldInMainSetterInPart'. +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_setter_conflict.dart:8:6: Context: Field 'topLevelFieldInMainSetterInPart' with the implicit setter. // int? topLevelFieldInMainSetterInPart; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/field_setter_conflict.dart.strong.outline.expect b/pkg/front_end/testcases/nnbd/field_setter_conflict.dart.strong.outline.expect index 365c6d6e514a..887193a8242e 100644 --- a/pkg/front_end/testcases/nnbd/field_setter_conflict.dart.strong.outline.expect +++ b/pkg/front_end/testcases/nnbd/field_setter_conflict.dart.strong.outline.expect @@ -2,21 +2,19 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/field_setter_conflict.dart:7:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldInPartSetterInMain'. -// void set topLevelFieldInPartSetterInMain(int? value) {} -// ^ -// // pkg/front_end/testcases/nnbd/field_setter_conflict_part.dart:39:6: Error: Conflicts with setter 'topLevelFieldInPartSetterInMain'. // int? topLevelFieldInPartSetterInMain; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_setter_conflict.dart:7:10: Context: Conflicting setter 'topLevelFieldInPartSetterInMain'. +// void set topLevelFieldInPartSetterInMain(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_setter_conflict_part.dart:40:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldInMainSetterInPart'. // void set topLevelFieldInMainSetterInPart(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_setter_conflict.dart:8:6: Error: Conflicts with setter 'topLevelFieldInMainSetterInPart'. +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_setter_conflict.dart:8:6: Context: Field 'topLevelFieldInMainSetterInPart' with the implicit setter. // int? topLevelFieldInMainSetterInPart; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/field_setter_conflict.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/field_setter_conflict.dart.strong.transformed.expect index 879240b37cbb..f3c9f5e49e09 100644 --- a/pkg/front_end/testcases/nnbd/field_setter_conflict.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/field_setter_conflict.dart.strong.transformed.expect @@ -2,21 +2,19 @@ library; // // Problems in library: // -// pkg/front_end/testcases/nnbd/field_setter_conflict.dart:7:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldInPartSetterInMain'. -// void set topLevelFieldInPartSetterInMain(int? value) {} -// ^ -// // pkg/front_end/testcases/nnbd/field_setter_conflict_part.dart:39:6: Error: Conflicts with setter 'topLevelFieldInPartSetterInMain'. // int? topLevelFieldInPartSetterInMain; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_setter_conflict.dart:7:10: Context: Conflicting setter 'topLevelFieldInPartSetterInMain'. +// void set topLevelFieldInPartSetterInMain(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_setter_conflict_part.dart:40:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldInMainSetterInPart'. // void set topLevelFieldInMainSetterInPart(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_setter_conflict.dart:8:6: Error: Conflicts with setter 'topLevelFieldInMainSetterInPart'. +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_setter_conflict.dart:8:6: Context: Field 'topLevelFieldInMainSetterInPart' with the implicit setter. // int? topLevelFieldInMainSetterInPart; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // import self as self; import "dart:core" as core; diff --git a/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.expect b/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.expect index 1a21f037684e..3b60d41233c6 100644 --- a/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.expect @@ -62,12 +62,26 @@ library; // int? duplicateExtensionInstanceFieldAndStaticSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:10:10: Error: 'topLevelFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:6:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndSetter'. +// void set topLevelFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:5:6: Context: Field 'topLevelFieldAndSetter' with the implicit setter. +// int? topLevelFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:9:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndDuplicateSetter'. // void set topLevelFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:9:10: Context: Previous declaration of 'topLevelFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:8:6: Context: Field 'topLevelFieldAndDuplicateSetter' with the implicit setter. +// int? topLevelFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:10:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndDuplicateSetter'. // void set topLevelFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:8:6: Context: Field 'topLevelFieldAndDuplicateSetter' with the implicit setter. +// int? topLevelFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:13:12: Error: 'duplicateTopLevelFieldAndSetter1' is already declared in this scope. // final int? duplicateTopLevelFieldAndSetter1 = null; @@ -76,6 +90,13 @@ library; // int? duplicateTopLevelFieldAndSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:14:10: Error: Conflicts with the implicit setter of the field 'duplicateTopLevelFieldAndSetter1'. +// void set duplicateTopLevelFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:12:6: Context: Field 'duplicateTopLevelFieldAndSetter1' with the implicit setter. +// int? duplicateTopLevelFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:17:6: Error: 'duplicateTopLevelFieldAndSetter2' is already declared in this scope. // int? duplicateTopLevelFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -83,19 +104,47 @@ library; // final int? duplicateTopLevelFieldAndSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:25:10: Error: 'topLevelLateFinalFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:21:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndSetter'. +// void set topLevelLateFinalFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:20:17: Context: Field 'topLevelLateFinalFieldAndSetter' with the implicit setter. +// late final int? topLevelLateFinalFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:24:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndDuplicateSetter'. // void set topLevelLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:24:10: Context: Previous declaration of 'topLevelLateFinalFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:23:17: Context: Field 'topLevelLateFinalFieldAndDuplicateSetter' with the implicit setter. +// late final int? topLevelLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:25:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndDuplicateSetter'. // void set topLevelLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:23:17: Context: Field 'topLevelLateFinalFieldAndDuplicateSetter' with the implicit setter. +// late final int? topLevelLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:33:12: Error: 'instanceFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:29:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter'. +// void set instanceFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:28:8: Context: Field 'instanceFieldAndSetter' with the implicit setter. +// int? instanceFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:32:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndDuplicateSetter'. // void set instanceFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:32:12: Context: Previous declaration of 'instanceFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:31:8: Context: Field 'instanceFieldAndDuplicateSetter' with the implicit setter. +// int? instanceFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:33:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndDuplicateSetter'. // void set instanceFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:31:8: Context: Field 'instanceFieldAndDuplicateSetter' with the implicit setter. +// int? instanceFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:36:14: Error: 'duplicateInstanceFieldAndSetter1' is already declared in this scope. // final int? duplicateInstanceFieldAndSetter1 = null; @@ -104,6 +153,13 @@ library; // int? duplicateInstanceFieldAndSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:37:12: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndSetter1'. +// void set duplicateInstanceFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:35:8: Context: Field 'duplicateInstanceFieldAndSetter1' with the implicit setter. +// int? duplicateInstanceFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:40:8: Error: 'duplicateInstanceFieldAndSetter2' is already declared in this scope. // int? duplicateInstanceFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -111,19 +167,47 @@ library; // final int? duplicateInstanceFieldAndSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:48:12: Error: 'instanceLateFinalFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:44:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter'. +// void set instanceLateFinalFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:43:19: Context: Field 'instanceLateFinalFieldAndSetter' with the implicit setter. +// late final int? instanceLateFinalFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:47:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndDuplicateSetter'. // void set instanceLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:47:12: Context: Previous declaration of 'instanceLateFinalFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:46:19: Context: Field 'instanceLateFinalFieldAndDuplicateSetter' with the implicit setter. +// late final int? instanceLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:48:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndDuplicateSetter'. // void set instanceLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:46:19: Context: Field 'instanceLateFinalFieldAndDuplicateSetter' with the implicit setter. +// late final int? instanceLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:55:19: Error: 'staticFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:51:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter'. +// static void set staticFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:50:15: Context: Field 'staticFieldAndSetter' with the implicit setter. +// static int? staticFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:54:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndDuplicateSetter'. // static void set staticFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:54:19: Context: Previous declaration of 'staticFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:53:15: Context: Field 'staticFieldAndDuplicateSetter' with the implicit setter. +// static int? staticFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:55:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndDuplicateSetter'. // static void set staticFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:53:15: Context: Field 'staticFieldAndDuplicateSetter' with the implicit setter. +// static int? staticFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:58:21: Error: 'duplicateStaticFieldAndSetter1' is already declared in this scope. // static final int? duplicateStaticFieldAndSetter1 = null; @@ -132,6 +216,13 @@ library; // static int? duplicateStaticFieldAndSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:59:19: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndSetter1'. +// static void set duplicateStaticFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:57:15: Context: Field 'duplicateStaticFieldAndSetter1' with the implicit setter. +// static int? duplicateStaticFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:62:15: Error: 'duplicateStaticFieldAndSetter2' is already declared in this scope. // static int? duplicateStaticFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -139,26 +230,68 @@ library; // static final int? duplicateStaticFieldAndSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:70:19: Error: 'staticLateFinalFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:66:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter'. +// static void set staticLateFinalFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:65:26: Context: Field 'staticLateFinalFieldAndSetter' with the implicit setter. +// static late final int? staticLateFinalFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:69:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndDuplicateSetter'. // static void set staticLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:69:19: Context: Previous declaration of 'staticLateFinalFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:68:26: Context: Field 'staticLateFinalFieldAndDuplicateSetter' with the implicit setter. +// static late final int? staticLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:70:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndDuplicateSetter'. // static void set staticLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:68:26: Context: Field 'staticLateFinalFieldAndDuplicateSetter' with the implicit setter. +// static late final int? staticLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:77:12: Error: 'staticFieldAndInstanceDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:73:12: Error: Conflicts with the implicit setter of the field 'staticFieldAndInstanceSetter'. +// void set staticFieldAndInstanceSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:72:15: Context: Field 'staticFieldAndInstanceSetter' with the implicit setter. +// static int? staticFieldAndInstanceSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:76:12: Error: Conflicts with the implicit setter of the field 'staticFieldAndInstanceDuplicateSetter'. // void set staticFieldAndInstanceDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:76:12: Context: Previous declaration of 'staticFieldAndInstanceDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:75:15: Context: Field 'staticFieldAndInstanceDuplicateSetter' with the implicit setter. +// static int? staticFieldAndInstanceDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:77:12: Error: Conflicts with the implicit setter of the field 'staticFieldAndInstanceDuplicateSetter'. // void set staticFieldAndInstanceDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:75:15: Context: Field 'staticFieldAndInstanceDuplicateSetter' with the implicit setter. +// static int? staticFieldAndInstanceDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:84:19: Error: 'instanceFieldAndStaticDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:80:19: Error: Conflicts with the implicit setter of the field 'instanceFieldAndStaticSetter'. +// static void set instanceFieldAndStaticSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:79:8: Context: Field 'instanceFieldAndStaticSetter' with the implicit setter. +// int? instanceFieldAndStaticSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:83:19: Error: Conflicts with the implicit setter of the field 'instanceFieldAndStaticDuplicateSetter'. // static void set instanceFieldAndStaticDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:83:19: Context: Previous declaration of 'instanceFieldAndStaticDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:82:8: Context: Field 'instanceFieldAndStaticDuplicateSetter' with the implicit setter. +// int? instanceFieldAndStaticDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:84:19: Error: Conflicts with the implicit setter of the field 'instanceFieldAndStaticDuplicateSetter'. // static void set instanceFieldAndStaticDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:82:8: Context: Field 'instanceFieldAndStaticDuplicateSetter' with the implicit setter. +// int? instanceFieldAndStaticDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:87:14: Error: 'duplicateInstanceFieldAndStaticSetter1' is already declared in this scope. // final int? duplicateInstanceFieldAndStaticSetter1 = null; @@ -167,6 +300,13 @@ library; // int? duplicateInstanceFieldAndStaticSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:88:19: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndStaticSetter1'. +// static void set duplicateInstanceFieldAndStaticSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:86:8: Context: Field 'duplicateInstanceFieldAndStaticSetter1' with the implicit setter. +// int? duplicateInstanceFieldAndStaticSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:91:8: Error: 'duplicateInstanceFieldAndStaticSetter2' is already declared in this scope. // int? duplicateInstanceFieldAndStaticSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -174,6 +314,20 @@ library; // final int? duplicateInstanceFieldAndStaticSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:92:19: Error: Static property 'duplicateInstanceFieldAndStaticSetter2' conflicts with instance property of the same name. +// static void set duplicateInstanceFieldAndStaticSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:90:14: Context: Conflicting instance property 'duplicateInstanceFieldAndStaticSetter2'. +// final int? duplicateInstanceFieldAndStaticSetter2 = null; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:92:19: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndStaticSetter2'. +// static void set duplicateInstanceFieldAndStaticSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:91:8: Context: Field 'duplicateInstanceFieldAndStaticSetter2' with the implicit setter. +// int? duplicateInstanceFieldAndStaticSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:95:21: Error: 'duplicateStaticFieldAndInstanceSetter1' is already declared in this scope. // static final int? duplicateStaticFieldAndInstanceSetter1 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -181,6 +335,13 @@ library; // static int? duplicateStaticFieldAndInstanceSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:96:12: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndInstanceSetter1'. +// void set duplicateStaticFieldAndInstanceSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:94:15: Context: Field 'duplicateStaticFieldAndInstanceSetter1' with the implicit setter. +// static int? duplicateStaticFieldAndInstanceSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:99:15: Error: 'duplicateStaticFieldAndInstanceSetter2' is already declared in this scope. // static int? duplicateStaticFieldAndInstanceSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -188,12 +349,40 @@ library; // static final int? duplicateStaticFieldAndInstanceSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:109:12: Error: 'extensionInstanceFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:100:12: Error: Instance property 'duplicateStaticFieldAndInstanceSetter2' conflicts with static property of the same name. +// void set duplicateStaticFieldAndInstanceSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:98:21: Context: Conflicting static property 'duplicateStaticFieldAndInstanceSetter2'. +// static final int? duplicateStaticFieldAndInstanceSetter2 = null; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:100:12: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndInstanceSetter2'. +// void set duplicateStaticFieldAndInstanceSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:99:15: Context: Field 'duplicateStaticFieldAndInstanceSetter2' with the implicit setter. +// static int? duplicateStaticFieldAndInstanceSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:105:12: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndSetter'. +// void set extensionInstanceFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:104:8: Context: Field 'extensionInstanceFieldAndSetter' with the implicit setter. +// int? extensionInstanceFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:108:12: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndDuplicateSetter'. // void set extensionInstanceFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:108:12: Context: Previous declaration of 'extensionInstanceFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:107:8: Context: Field 'extensionInstanceFieldAndDuplicateSetter' with the implicit setter. +// int? extensionInstanceFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:109:12: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndDuplicateSetter'. // void set extensionInstanceFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:107:8: Context: Field 'extensionInstanceFieldAndDuplicateSetter' with the implicit setter. +// int? extensionInstanceFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:112:14: Error: 'duplicateExtensionInstanceFieldAndSetter1' is already declared in this scope. // final int? duplicateExtensionInstanceFieldAndSetter1 = null; @@ -202,6 +391,13 @@ library; // int? duplicateExtensionInstanceFieldAndSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:113:12: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndSetter1'. +// void set duplicateExtensionInstanceFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:111:8: Context: Field 'duplicateExtensionInstanceFieldAndSetter1' with the implicit setter. +// int? duplicateExtensionInstanceFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:116:8: Error: 'duplicateExtensionInstanceFieldAndSetter2' is already declared in this scope. // int? duplicateExtensionInstanceFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -209,12 +405,26 @@ library; // final int? duplicateExtensionInstanceFieldAndSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:124:19: Error: 'extensionStaticFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:120:19: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndSetter'. +// static void set extensionStaticFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:119:15: Context: Field 'extensionStaticFieldAndSetter' with the implicit setter. +// static int? extensionStaticFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:123:19: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndDuplicateSetter'. // static void set extensionStaticFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:123:19: Context: Previous declaration of 'extensionStaticFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:122:15: Context: Field 'extensionStaticFieldAndDuplicateSetter' with the implicit setter. +// static int? extensionStaticFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:124:19: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndDuplicateSetter'. // static void set extensionStaticFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:122:15: Context: Field 'extensionStaticFieldAndDuplicateSetter' with the implicit setter. +// static int? extensionStaticFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:127:21: Error: 'duplicateExtensionStaticFieldAndSetter1' is already declared in this scope. // static final int? duplicateExtensionStaticFieldAndSetter1 = null; @@ -223,6 +433,13 @@ library; // static int? duplicateExtensionStaticFieldAndSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:128:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionStaticFieldAndSetter1'. +// static void set duplicateExtensionStaticFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:126:15: Context: Field 'duplicateExtensionStaticFieldAndSetter1' with the implicit setter. +// static int? duplicateExtensionStaticFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:131:15: Error: 'duplicateExtensionStaticFieldAndSetter2' is already declared in this scope. // static int? duplicateExtensionStaticFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -230,26 +447,68 @@ library; // static final int? duplicateExtensionStaticFieldAndSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:139:19: Error: 'extensionStaticLateFinalFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:135:19: Error: Conflicts with the implicit setter of the field 'extensionStaticLateFinalFieldAndSetter'. +// static void set extensionStaticLateFinalFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:134:26: Context: Field 'extensionStaticLateFinalFieldAndSetter' with the implicit setter. +// static late final int? extensionStaticLateFinalFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:138:19: Error: Conflicts with the implicit setter of the field 'extensionStaticLateFinalFieldAndDuplicateSetter'. // static void set extensionStaticLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:138:19: Context: Previous declaration of 'extensionStaticLateFinalFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:137:26: Context: Field 'extensionStaticLateFinalFieldAndDuplicateSetter' with the implicit setter. +// static late final int? extensionStaticLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:139:19: Error: Conflicts with the implicit setter of the field 'extensionStaticLateFinalFieldAndDuplicateSetter'. // static void set extensionStaticLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:137:26: Context: Field 'extensionStaticLateFinalFieldAndDuplicateSetter' with the implicit setter. +// static late final int? extensionStaticLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:146:12: Error: 'extensionStaticFieldAndInstanceDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:142:12: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndInstanceSetter'. +// void set extensionStaticFieldAndInstanceSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:141:15: Context: Field 'extensionStaticFieldAndInstanceSetter' with the implicit setter. +// static int? extensionStaticFieldAndInstanceSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:145:12: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndInstanceDuplicateSetter'. // void set extensionStaticFieldAndInstanceDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:145:12: Context: Previous declaration of 'extensionStaticFieldAndInstanceDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:144:15: Context: Field 'extensionStaticFieldAndInstanceDuplicateSetter' with the implicit setter. +// static int? extensionStaticFieldAndInstanceDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:146:12: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndInstanceDuplicateSetter'. // void set extensionStaticFieldAndInstanceDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:144:15: Context: Field 'extensionStaticFieldAndInstanceDuplicateSetter' with the implicit setter. +// static int? extensionStaticFieldAndInstanceDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:153:19: Error: 'extensionInstanceFieldAndStaticDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:149:19: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndStaticSetter'. +// static void set extensionInstanceFieldAndStaticSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:148:8: Context: Field 'extensionInstanceFieldAndStaticSetter' with the implicit setter. +// int? extensionInstanceFieldAndStaticSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:152:19: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndStaticDuplicateSetter'. // static void set extensionInstanceFieldAndStaticDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:152:19: Context: Previous declaration of 'extensionInstanceFieldAndStaticDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:151:8: Context: Field 'extensionInstanceFieldAndStaticDuplicateSetter' with the implicit setter. +// int? extensionInstanceFieldAndStaticDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:153:19: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndStaticDuplicateSetter'. // static void set extensionInstanceFieldAndStaticDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:151:8: Context: Field 'extensionInstanceFieldAndStaticDuplicateSetter' with the implicit setter. +// int? extensionInstanceFieldAndStaticDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:156:14: Error: 'duplicateExtensionInstanceFieldAndStaticSetter1' is already declared in this scope. // final int? duplicateExtensionInstanceFieldAndStaticSetter1 = null; @@ -258,6 +517,13 @@ library; // int? duplicateExtensionInstanceFieldAndStaticSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:157:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndStaticSetter1'. +// static void set duplicateExtensionInstanceFieldAndStaticSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:155:8: Context: Field 'duplicateExtensionInstanceFieldAndStaticSetter1' with the implicit setter. +// int? duplicateExtensionInstanceFieldAndStaticSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:160:8: Error: 'duplicateExtensionInstanceFieldAndStaticSetter2' is already declared in this scope. // int? duplicateExtensionInstanceFieldAndStaticSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -265,6 +531,20 @@ library; // final int? duplicateExtensionInstanceFieldAndStaticSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:161:19: Error: Static property 'duplicateExtensionInstanceFieldAndStaticSetter2' conflicts with instance property of the same name. +// static void set duplicateExtensionInstanceFieldAndStaticSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:159:14: Context: Conflicting instance property 'duplicateExtensionInstanceFieldAndStaticSetter2'. +// final int? duplicateExtensionInstanceFieldAndStaticSetter2 = null; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:161:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndStaticSetter2'. +// static void set duplicateExtensionInstanceFieldAndStaticSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:160:8: Context: Field 'duplicateExtensionInstanceFieldAndStaticSetter2' with the implicit setter. +// int? duplicateExtensionInstanceFieldAndStaticSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:164:21: Error: 'duplicateExtensionStaticFieldAndInstanceSetter1' is already declared in this scope. // static final int? duplicateExtensionStaticFieldAndInstanceSetter1 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -272,6 +552,13 @@ library; // static int? duplicateExtensionStaticFieldAndInstanceSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:165:12: Error: Conflicts with the implicit setter of the field 'duplicateExtensionStaticFieldAndInstanceSetter1'. +// void set duplicateExtensionStaticFieldAndInstanceSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:163:15: Context: Field 'duplicateExtensionStaticFieldAndInstanceSetter1' with the implicit setter. +// static int? duplicateExtensionStaticFieldAndInstanceSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:168:15: Error: 'duplicateExtensionStaticFieldAndInstanceSetter2' is already declared in this scope. // static int? duplicateExtensionStaticFieldAndInstanceSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -279,425 +566,19 @@ library; // static final int? duplicateExtensionStaticFieldAndInstanceSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:6:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndSetter'. -// void set topLevelFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:5:6: Error: Conflicts with setter 'topLevelFieldAndSetter'. -// int? topLevelFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:10:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndDuplicateSetter'. -// void set topLevelFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:9:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndDuplicateSetter'. -// void set topLevelFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:8:6: Error: Conflicts with setter 'topLevelFieldAndDuplicateSetter'. -// int? topLevelFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:14:10: Error: Conflicts with the implicit setter of the field 'duplicateTopLevelFieldAndSetter1'. -// void set duplicateTopLevelFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:12:6: Error: Conflicts with setter 'duplicateTopLevelFieldAndSetter1'. -// int? duplicateTopLevelFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:18:10: Error: Conflicts with the implicit setter of the field 'duplicateTopLevelFieldAndSetter2'. -// void set duplicateTopLevelFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:17:6: Error: Conflicts with setter 'duplicateTopLevelFieldAndSetter2'. -// int? duplicateTopLevelFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:21:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndSetter'. -// void set topLevelLateFinalFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:20:17: Error: Conflicts with setter 'topLevelLateFinalFieldAndSetter'. -// late final int? topLevelLateFinalFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:25:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndDuplicateSetter'. -// void set topLevelLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:24:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndDuplicateSetter'. -// void set topLevelLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:23:17: Error: Conflicts with setter 'topLevelLateFinalFieldAndDuplicateSetter'. -// late final int? topLevelLateFinalFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:29:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter'. -// void set instanceFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:28:8: Error: Conflicts with setter 'instanceFieldAndSetter'. -// int? instanceFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:33:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndDuplicateSetter'. -// void set instanceFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:32:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndDuplicateSetter'. -// void set instanceFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:31:8: Error: Conflicts with setter 'instanceFieldAndDuplicateSetter'. -// int? instanceFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:37:12: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndSetter1'. -// void set duplicateInstanceFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:35:8: Error: Conflicts with setter 'duplicateInstanceFieldAndSetter1'. -// int? duplicateInstanceFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:41:12: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndSetter2'. -// void set duplicateInstanceFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:40:8: Error: Conflicts with setter 'duplicateInstanceFieldAndSetter2'. -// int? duplicateInstanceFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:44:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter'. -// void set instanceLateFinalFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:43:19: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter'. -// late final int? instanceLateFinalFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:48:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndDuplicateSetter'. -// void set instanceLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:47:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndDuplicateSetter'. -// void set instanceLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:46:19: Error: Conflicts with setter 'instanceLateFinalFieldAndDuplicateSetter'. -// late final int? instanceLateFinalFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:51:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter'. -// static void set staticFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:50:15: Error: Conflicts with setter 'staticFieldAndSetter'. -// static int? staticFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:55:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndDuplicateSetter'. -// static void set staticFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:54:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndDuplicateSetter'. -// static void set staticFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:53:15: Error: Conflicts with setter 'staticFieldAndDuplicateSetter'. -// static int? staticFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:59:19: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndSetter1'. -// static void set duplicateStaticFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:57:15: Error: Conflicts with setter 'duplicateStaticFieldAndSetter1'. -// static int? duplicateStaticFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:63:19: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndSetter2'. -// static void set duplicateStaticFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:62:15: Error: Conflicts with setter 'duplicateStaticFieldAndSetter2'. -// static int? duplicateStaticFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:66:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter'. -// static void set staticLateFinalFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:65:26: Error: Conflicts with setter 'staticLateFinalFieldAndSetter'. -// static late final int? staticLateFinalFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:70:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndDuplicateSetter'. -// static void set staticLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:69:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndDuplicateSetter'. -// static void set staticLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:68:26: Error: Conflicts with setter 'staticLateFinalFieldAndDuplicateSetter'. -// static late final int? staticLateFinalFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:73:12: Error: Conflicts with the implicit setter of the field 'staticFieldAndInstanceSetter'. -// void set staticFieldAndInstanceSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:72:15: Error: Conflicts with setter 'staticFieldAndInstanceSetter'. -// static int? staticFieldAndInstanceSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:77:12: Error: Conflicts with the implicit setter of the field 'staticFieldAndInstanceDuplicateSetter'. -// void set staticFieldAndInstanceDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:76:12: Error: Conflicts with the implicit setter of the field 'staticFieldAndInstanceDuplicateSetter'. -// void set staticFieldAndInstanceDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:75:15: Error: Conflicts with setter 'staticFieldAndInstanceDuplicateSetter'. -// static int? staticFieldAndInstanceDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:80:19: Error: Conflicts with the implicit setter of the field 'instanceFieldAndStaticSetter'. -// static void set instanceFieldAndStaticSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:79:8: Error: Conflicts with setter 'instanceFieldAndStaticSetter'. -// int? instanceFieldAndStaticSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:84:19: Error: Conflicts with the implicit setter of the field 'instanceFieldAndStaticDuplicateSetter'. -// static void set instanceFieldAndStaticDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:83:19: Error: Conflicts with the implicit setter of the field 'instanceFieldAndStaticDuplicateSetter'. -// static void set instanceFieldAndStaticDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:82:8: Error: Conflicts with setter 'instanceFieldAndStaticDuplicateSetter'. -// int? instanceFieldAndStaticDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:88:19: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndStaticSetter1'. -// static void set duplicateInstanceFieldAndStaticSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:86:8: Error: Conflicts with setter 'duplicateInstanceFieldAndStaticSetter1'. -// int? duplicateInstanceFieldAndStaticSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:92:19: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndStaticSetter2'. -// static void set duplicateInstanceFieldAndStaticSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:91:8: Error: Conflicts with setter 'duplicateInstanceFieldAndStaticSetter2'. -// int? duplicateInstanceFieldAndStaticSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:96:12: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndInstanceSetter1'. -// void set duplicateStaticFieldAndInstanceSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:94:15: Error: Conflicts with setter 'duplicateStaticFieldAndInstanceSetter1'. -// static int? duplicateStaticFieldAndInstanceSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:100:12: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndInstanceSetter2'. -// void set duplicateStaticFieldAndInstanceSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:99:15: Error: Conflicts with setter 'duplicateStaticFieldAndInstanceSetter2'. -// static int? duplicateStaticFieldAndInstanceSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:105:12: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndSetter'. -// void set extensionInstanceFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:104:8: Error: Conflicts with setter 'extensionInstanceFieldAndSetter'. -// int? extensionInstanceFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:109:12: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndDuplicateSetter'. -// void set extensionInstanceFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:108:12: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndDuplicateSetter'. -// void set extensionInstanceFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:107:8: Error: Conflicts with setter 'extensionInstanceFieldAndDuplicateSetter'. -// int? extensionInstanceFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:113:12: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndSetter1'. -// void set duplicateExtensionInstanceFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:111:8: Error: Conflicts with setter 'duplicateExtensionInstanceFieldAndSetter1'. -// int? duplicateExtensionInstanceFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:117:12: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndSetter2'. -// void set duplicateExtensionInstanceFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:116:8: Error: Conflicts with setter 'duplicateExtensionInstanceFieldAndSetter2'. -// int? duplicateExtensionInstanceFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:120:19: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndSetter'. -// static void set extensionStaticFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:119:15: Error: Conflicts with setter 'extensionStaticFieldAndSetter'. -// static int? extensionStaticFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:124:19: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndDuplicateSetter'. -// static void set extensionStaticFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:123:19: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndDuplicateSetter'. -// static void set extensionStaticFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:122:15: Error: Conflicts with setter 'extensionStaticFieldAndDuplicateSetter'. -// static int? extensionStaticFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:128:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionStaticFieldAndSetter1'. -// static void set duplicateExtensionStaticFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:126:15: Error: Conflicts with setter 'duplicateExtensionStaticFieldAndSetter1'. -// static int? duplicateExtensionStaticFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:132:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionStaticFieldAndSetter2'. -// static void set duplicateExtensionStaticFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:131:15: Error: Conflicts with setter 'duplicateExtensionStaticFieldAndSetter2'. -// static int? duplicateExtensionStaticFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:135:19: Error: Conflicts with the implicit setter of the field 'extensionStaticLateFinalFieldAndSetter'. -// static void set extensionStaticLateFinalFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:134:26: Error: Conflicts with setter 'extensionStaticLateFinalFieldAndSetter'. -// static late final int? extensionStaticLateFinalFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:139:19: Error: Conflicts with the implicit setter of the field 'extensionStaticLateFinalFieldAndDuplicateSetter'. -// static void set extensionStaticLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:138:19: Error: Conflicts with the implicit setter of the field 'extensionStaticLateFinalFieldAndDuplicateSetter'. -// static void set extensionStaticLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:137:26: Error: Conflicts with setter 'extensionStaticLateFinalFieldAndDuplicateSetter'. -// static late final int? extensionStaticLateFinalFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:142:12: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndInstanceSetter'. -// void set extensionStaticFieldAndInstanceSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:141:15: Error: Conflicts with setter 'extensionStaticFieldAndInstanceSetter'. -// static int? extensionStaticFieldAndInstanceSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:146:12: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndInstanceDuplicateSetter'. -// void set extensionStaticFieldAndInstanceDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:145:12: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndInstanceDuplicateSetter'. -// void set extensionStaticFieldAndInstanceDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:144:15: Error: Conflicts with setter 'extensionStaticFieldAndInstanceDuplicateSetter'. -// static int? extensionStaticFieldAndInstanceDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:149:19: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndStaticSetter'. -// static void set extensionInstanceFieldAndStaticSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:148:8: Error: Conflicts with setter 'extensionInstanceFieldAndStaticSetter'. -// int? extensionInstanceFieldAndStaticSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:153:19: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndStaticDuplicateSetter'. -// static void set extensionInstanceFieldAndStaticDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:152:19: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndStaticDuplicateSetter'. -// static void set extensionInstanceFieldAndStaticDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:151:8: Error: Conflicts with setter 'extensionInstanceFieldAndStaticDuplicateSetter'. -// int? extensionInstanceFieldAndStaticDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:157:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndStaticSetter1'. -// static void set duplicateExtensionInstanceFieldAndStaticSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:155:8: Error: Conflicts with setter 'duplicateExtensionInstanceFieldAndStaticSetter1'. -// int? duplicateExtensionInstanceFieldAndStaticSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:156:14: Error: Conflicts with setter 'duplicateExtensionInstanceFieldAndStaticSetter1'. -// final int? duplicateExtensionInstanceFieldAndStaticSetter1 = null; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:161:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndStaticSetter2'. -// static void set duplicateExtensionInstanceFieldAndStaticSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:160:8: Error: Conflicts with setter 'duplicateExtensionInstanceFieldAndStaticSetter2'. -// int? duplicateExtensionInstanceFieldAndStaticSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:159:14: Error: Conflicts with setter 'duplicateExtensionInstanceFieldAndStaticSetter2'. -// final int? duplicateExtensionInstanceFieldAndStaticSetter2 = null; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:165:12: Error: Conflicts with the implicit setter of the field 'duplicateExtensionStaticFieldAndInstanceSetter1'. -// void set duplicateExtensionStaticFieldAndInstanceSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:163:15: Error: Conflicts with setter 'duplicateExtensionStaticFieldAndInstanceSetter1'. -// static int? duplicateExtensionStaticFieldAndInstanceSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:164:21: Error: Conflicts with setter 'duplicateExtensionStaticFieldAndInstanceSetter1'. -// static final int? duplicateExtensionStaticFieldAndInstanceSetter1 = null; -// ^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:169:12: Error: Instance property 'duplicateExtensionStaticFieldAndInstanceSetter2' conflicts with static property of the same name. +// void set duplicateExtensionStaticFieldAndInstanceSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:167:21: Context: Conflicting static property 'duplicateExtensionStaticFieldAndInstanceSetter2'. +// static final int? duplicateExtensionStaticFieldAndInstanceSetter2 = null; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:169:12: Error: Conflicts with the implicit setter of the field 'duplicateExtensionStaticFieldAndInstanceSetter2'. // void set duplicateExtensionStaticFieldAndInstanceSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:168:15: Error: Conflicts with setter 'duplicateExtensionStaticFieldAndInstanceSetter2'. +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:168:15: Context: Field 'duplicateExtensionStaticFieldAndInstanceSetter2' with the implicit setter. // static int? duplicateExtensionStaticFieldAndInstanceSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:167:21: Error: Conflicts with setter 'duplicateExtensionStaticFieldAndInstanceSetter2'. -// static final int? duplicateExtensionStaticFieldAndInstanceSetter2 = null; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:178:38: Error: Can't use 'duplicateTopLevelFieldAndSetter1' because it is declared more than once. // duplicateTopLevelFieldAndSetter1 = duplicateTopLevelFieldAndSetter1; @@ -948,11 +829,6 @@ library; // 0.duplicateExtensionInstanceFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:238:5: Error: The setter 'duplicateExtensionInstanceFieldAndSetter2' isn't defined for the class 'int'. -// Try correcting the name to the name of an existing setter, or defining a setter or field named 'duplicateExtensionInstanceFieldAndSetter2'. -// 0.duplicateExtensionInstanceFieldAndSetter2 = -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:257:5: Error: The setter 'extensionStaticFieldAndInstanceSetter' isn't defined for the class 'int'. // Try correcting the name to the name of an existing setter, or defining a setter or field named 'extensionStaticFieldAndInstanceSetter'. // 0.extensionStaticFieldAndInstanceSetter = @@ -1040,6 +916,8 @@ class Class extends core::Object { synthetic constructor •() → self::Class : super core::Object::•() ; + set duplicateInstanceFieldAndSetter2(core::int? value) → void {} + static set duplicateStaticFieldAndSetter2(core::int? value) → void {} } extension Extension on core::int? { field extensionInstanceFieldAndSetter = self::Extension|extensionInstanceFieldAndSetter; @@ -1060,6 +938,8 @@ extension Extension on core::int? { field duplicateExtensionInstanceFieldAndStaticSetter2 = self::Extension|duplicateExtensionInstanceFieldAndStaticSetter2; static field duplicateExtensionStaticFieldAndInstanceSetter1 = self::Extension|duplicateExtensionStaticFieldAndInstanceSetter1; static field duplicateExtensionStaticFieldAndInstanceSetter2 = self::Extension|duplicateExtensionStaticFieldAndInstanceSetter2; + set duplicateExtensionInstanceFieldAndSetter2 = self::Extension|set#duplicateExtensionInstanceFieldAndSetter2; + static set duplicateExtensionStaticFieldAndSetter2 = set self::Extension|duplicateExtensionStaticFieldAndSetter2; } static field core::int? topLevelFieldAndSetter; static field core::int? topLevelFieldAndDuplicateSetter; @@ -1085,6 +965,9 @@ static field core::int? Extension|duplicateExtensionInstanceFieldAndStaticSetter static final field core::int? Extension|duplicateExtensionInstanceFieldAndStaticSetter2 = null; static field core::int? Extension|duplicateExtensionStaticFieldAndInstanceSetter1; static final field core::int? Extension|duplicateExtensionStaticFieldAndInstanceSetter2 = null; +static set duplicateTopLevelFieldAndSetter2(core::int? value) → void {} +static extension-member method Extension|set#duplicateExtensionInstanceFieldAndSetter2(lowered final core::int? #this, core::int? value) → void {} +static extension-member set Extension|duplicateExtensionStaticFieldAndSetter2(core::int? value) → void {} static method test() → dynamic { self::topLevelFieldAndSetter = self::topLevelFieldAndSetter; self::topLevelFieldAndDuplicateSetter = self::topLevelFieldAndDuplicateSetter; @@ -1184,13 +1067,10 @@ Try correcting the name to the name of an existing setter, or defining a setter Try correcting the name to the name of an existing getter, or defining a getter or field named 'duplicateExtensionInstanceFieldAndSetter1'. 0.duplicateExtensionInstanceFieldAndSetter1; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" in 0{}.duplicateExtensionInstanceFieldAndSetter1; - invalid-expression "pkg/front_end/testcases/nnbd/field_vs_setter.dart:238:5: Error: The setter 'duplicateExtensionInstanceFieldAndSetter2' isn't defined for the class 'int'. -Try correcting the name to the name of an existing setter, or defining a setter or field named 'duplicateExtensionInstanceFieldAndSetter2'. - 0.duplicateExtensionInstanceFieldAndSetter2 = - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" in 0.{}duplicateExtensionInstanceFieldAndSetter2 = invalid-expression "pkg/front_end/testcases/nnbd/field_vs_setter.dart:239:9: Error: The getter 'duplicateExtensionInstanceFieldAndSetter2' isn't defined for the class 'int'. + self::Extension|set#duplicateExtensionInstanceFieldAndSetter2(0, invalid-expression "pkg/front_end/testcases/nnbd/field_vs_setter.dart:239:9: Error: The getter 'duplicateExtensionInstanceFieldAndSetter2' isn't defined for the class 'int'. Try correcting the name to the name of an existing getter, or defining a getter or field named 'duplicateExtensionInstanceFieldAndSetter2'. 0.duplicateExtensionInstanceFieldAndSetter2; - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" in 0{}.duplicateExtensionInstanceFieldAndSetter2; + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" in 0{}.duplicateExtensionInstanceFieldAndSetter2 as{TypeError,ForDynamic} core::int?); self::Extension|extensionStaticFieldAndSetter = self::Extension|extensionStaticFieldAndSetter; self::Extension|extensionStaticFieldAndDuplicateSetter = self::Extension|extensionStaticFieldAndDuplicateSetter; self::Extension|extensionStaticLateFinalFieldAndSetter = self::Extension|extensionStaticLateFinalFieldAndSetter; diff --git a/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.modular.expect b/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.modular.expect index 1a21f037684e..3b60d41233c6 100644 --- a/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.modular.expect +++ b/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.modular.expect @@ -62,12 +62,26 @@ library; // int? duplicateExtensionInstanceFieldAndStaticSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:10:10: Error: 'topLevelFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:6:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndSetter'. +// void set topLevelFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:5:6: Context: Field 'topLevelFieldAndSetter' with the implicit setter. +// int? topLevelFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:9:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndDuplicateSetter'. // void set topLevelFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:9:10: Context: Previous declaration of 'topLevelFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:8:6: Context: Field 'topLevelFieldAndDuplicateSetter' with the implicit setter. +// int? topLevelFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:10:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndDuplicateSetter'. // void set topLevelFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:8:6: Context: Field 'topLevelFieldAndDuplicateSetter' with the implicit setter. +// int? topLevelFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:13:12: Error: 'duplicateTopLevelFieldAndSetter1' is already declared in this scope. // final int? duplicateTopLevelFieldAndSetter1 = null; @@ -76,6 +90,13 @@ library; // int? duplicateTopLevelFieldAndSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:14:10: Error: Conflicts with the implicit setter of the field 'duplicateTopLevelFieldAndSetter1'. +// void set duplicateTopLevelFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:12:6: Context: Field 'duplicateTopLevelFieldAndSetter1' with the implicit setter. +// int? duplicateTopLevelFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:17:6: Error: 'duplicateTopLevelFieldAndSetter2' is already declared in this scope. // int? duplicateTopLevelFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -83,19 +104,47 @@ library; // final int? duplicateTopLevelFieldAndSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:25:10: Error: 'topLevelLateFinalFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:21:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndSetter'. +// void set topLevelLateFinalFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:20:17: Context: Field 'topLevelLateFinalFieldAndSetter' with the implicit setter. +// late final int? topLevelLateFinalFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:24:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndDuplicateSetter'. // void set topLevelLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:24:10: Context: Previous declaration of 'topLevelLateFinalFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:23:17: Context: Field 'topLevelLateFinalFieldAndDuplicateSetter' with the implicit setter. +// late final int? topLevelLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:25:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndDuplicateSetter'. // void set topLevelLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:23:17: Context: Field 'topLevelLateFinalFieldAndDuplicateSetter' with the implicit setter. +// late final int? topLevelLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:33:12: Error: 'instanceFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:29:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter'. +// void set instanceFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:28:8: Context: Field 'instanceFieldAndSetter' with the implicit setter. +// int? instanceFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:32:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndDuplicateSetter'. // void set instanceFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:32:12: Context: Previous declaration of 'instanceFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:31:8: Context: Field 'instanceFieldAndDuplicateSetter' with the implicit setter. +// int? instanceFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:33:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndDuplicateSetter'. // void set instanceFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:31:8: Context: Field 'instanceFieldAndDuplicateSetter' with the implicit setter. +// int? instanceFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:36:14: Error: 'duplicateInstanceFieldAndSetter1' is already declared in this scope. // final int? duplicateInstanceFieldAndSetter1 = null; @@ -104,6 +153,13 @@ library; // int? duplicateInstanceFieldAndSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:37:12: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndSetter1'. +// void set duplicateInstanceFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:35:8: Context: Field 'duplicateInstanceFieldAndSetter1' with the implicit setter. +// int? duplicateInstanceFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:40:8: Error: 'duplicateInstanceFieldAndSetter2' is already declared in this scope. // int? duplicateInstanceFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -111,19 +167,47 @@ library; // final int? duplicateInstanceFieldAndSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:48:12: Error: 'instanceLateFinalFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:44:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter'. +// void set instanceLateFinalFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:43:19: Context: Field 'instanceLateFinalFieldAndSetter' with the implicit setter. +// late final int? instanceLateFinalFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:47:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndDuplicateSetter'. // void set instanceLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:47:12: Context: Previous declaration of 'instanceLateFinalFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:46:19: Context: Field 'instanceLateFinalFieldAndDuplicateSetter' with the implicit setter. +// late final int? instanceLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:48:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndDuplicateSetter'. // void set instanceLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:46:19: Context: Field 'instanceLateFinalFieldAndDuplicateSetter' with the implicit setter. +// late final int? instanceLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:55:19: Error: 'staticFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:51:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter'. +// static void set staticFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:50:15: Context: Field 'staticFieldAndSetter' with the implicit setter. +// static int? staticFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:54:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndDuplicateSetter'. // static void set staticFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:54:19: Context: Previous declaration of 'staticFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:53:15: Context: Field 'staticFieldAndDuplicateSetter' with the implicit setter. +// static int? staticFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:55:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndDuplicateSetter'. // static void set staticFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:53:15: Context: Field 'staticFieldAndDuplicateSetter' with the implicit setter. +// static int? staticFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:58:21: Error: 'duplicateStaticFieldAndSetter1' is already declared in this scope. // static final int? duplicateStaticFieldAndSetter1 = null; @@ -132,6 +216,13 @@ library; // static int? duplicateStaticFieldAndSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:59:19: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndSetter1'. +// static void set duplicateStaticFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:57:15: Context: Field 'duplicateStaticFieldAndSetter1' with the implicit setter. +// static int? duplicateStaticFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:62:15: Error: 'duplicateStaticFieldAndSetter2' is already declared in this scope. // static int? duplicateStaticFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -139,26 +230,68 @@ library; // static final int? duplicateStaticFieldAndSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:70:19: Error: 'staticLateFinalFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:66:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter'. +// static void set staticLateFinalFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:65:26: Context: Field 'staticLateFinalFieldAndSetter' with the implicit setter. +// static late final int? staticLateFinalFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:69:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndDuplicateSetter'. // static void set staticLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:69:19: Context: Previous declaration of 'staticLateFinalFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:68:26: Context: Field 'staticLateFinalFieldAndDuplicateSetter' with the implicit setter. +// static late final int? staticLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:70:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndDuplicateSetter'. // static void set staticLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:68:26: Context: Field 'staticLateFinalFieldAndDuplicateSetter' with the implicit setter. +// static late final int? staticLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:77:12: Error: 'staticFieldAndInstanceDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:73:12: Error: Conflicts with the implicit setter of the field 'staticFieldAndInstanceSetter'. +// void set staticFieldAndInstanceSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:72:15: Context: Field 'staticFieldAndInstanceSetter' with the implicit setter. +// static int? staticFieldAndInstanceSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:76:12: Error: Conflicts with the implicit setter of the field 'staticFieldAndInstanceDuplicateSetter'. // void set staticFieldAndInstanceDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:76:12: Context: Previous declaration of 'staticFieldAndInstanceDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:75:15: Context: Field 'staticFieldAndInstanceDuplicateSetter' with the implicit setter. +// static int? staticFieldAndInstanceDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:77:12: Error: Conflicts with the implicit setter of the field 'staticFieldAndInstanceDuplicateSetter'. // void set staticFieldAndInstanceDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:75:15: Context: Field 'staticFieldAndInstanceDuplicateSetter' with the implicit setter. +// static int? staticFieldAndInstanceDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:84:19: Error: 'instanceFieldAndStaticDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:80:19: Error: Conflicts with the implicit setter of the field 'instanceFieldAndStaticSetter'. +// static void set instanceFieldAndStaticSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:79:8: Context: Field 'instanceFieldAndStaticSetter' with the implicit setter. +// int? instanceFieldAndStaticSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:83:19: Error: Conflicts with the implicit setter of the field 'instanceFieldAndStaticDuplicateSetter'. // static void set instanceFieldAndStaticDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:83:19: Context: Previous declaration of 'instanceFieldAndStaticDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:82:8: Context: Field 'instanceFieldAndStaticDuplicateSetter' with the implicit setter. +// int? instanceFieldAndStaticDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:84:19: Error: Conflicts with the implicit setter of the field 'instanceFieldAndStaticDuplicateSetter'. // static void set instanceFieldAndStaticDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:82:8: Context: Field 'instanceFieldAndStaticDuplicateSetter' with the implicit setter. +// int? instanceFieldAndStaticDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:87:14: Error: 'duplicateInstanceFieldAndStaticSetter1' is already declared in this scope. // final int? duplicateInstanceFieldAndStaticSetter1 = null; @@ -167,6 +300,13 @@ library; // int? duplicateInstanceFieldAndStaticSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:88:19: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndStaticSetter1'. +// static void set duplicateInstanceFieldAndStaticSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:86:8: Context: Field 'duplicateInstanceFieldAndStaticSetter1' with the implicit setter. +// int? duplicateInstanceFieldAndStaticSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:91:8: Error: 'duplicateInstanceFieldAndStaticSetter2' is already declared in this scope. // int? duplicateInstanceFieldAndStaticSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -174,6 +314,20 @@ library; // final int? duplicateInstanceFieldAndStaticSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:92:19: Error: Static property 'duplicateInstanceFieldAndStaticSetter2' conflicts with instance property of the same name. +// static void set duplicateInstanceFieldAndStaticSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:90:14: Context: Conflicting instance property 'duplicateInstanceFieldAndStaticSetter2'. +// final int? duplicateInstanceFieldAndStaticSetter2 = null; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:92:19: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndStaticSetter2'. +// static void set duplicateInstanceFieldAndStaticSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:91:8: Context: Field 'duplicateInstanceFieldAndStaticSetter2' with the implicit setter. +// int? duplicateInstanceFieldAndStaticSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:95:21: Error: 'duplicateStaticFieldAndInstanceSetter1' is already declared in this scope. // static final int? duplicateStaticFieldAndInstanceSetter1 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -181,6 +335,13 @@ library; // static int? duplicateStaticFieldAndInstanceSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:96:12: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndInstanceSetter1'. +// void set duplicateStaticFieldAndInstanceSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:94:15: Context: Field 'duplicateStaticFieldAndInstanceSetter1' with the implicit setter. +// static int? duplicateStaticFieldAndInstanceSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:99:15: Error: 'duplicateStaticFieldAndInstanceSetter2' is already declared in this scope. // static int? duplicateStaticFieldAndInstanceSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -188,12 +349,40 @@ library; // static final int? duplicateStaticFieldAndInstanceSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:109:12: Error: 'extensionInstanceFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:100:12: Error: Instance property 'duplicateStaticFieldAndInstanceSetter2' conflicts with static property of the same name. +// void set duplicateStaticFieldAndInstanceSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:98:21: Context: Conflicting static property 'duplicateStaticFieldAndInstanceSetter2'. +// static final int? duplicateStaticFieldAndInstanceSetter2 = null; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:100:12: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndInstanceSetter2'. +// void set duplicateStaticFieldAndInstanceSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:99:15: Context: Field 'duplicateStaticFieldAndInstanceSetter2' with the implicit setter. +// static int? duplicateStaticFieldAndInstanceSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:105:12: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndSetter'. +// void set extensionInstanceFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:104:8: Context: Field 'extensionInstanceFieldAndSetter' with the implicit setter. +// int? extensionInstanceFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:108:12: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndDuplicateSetter'. // void set extensionInstanceFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:108:12: Context: Previous declaration of 'extensionInstanceFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:107:8: Context: Field 'extensionInstanceFieldAndDuplicateSetter' with the implicit setter. +// int? extensionInstanceFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:109:12: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndDuplicateSetter'. // void set extensionInstanceFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:107:8: Context: Field 'extensionInstanceFieldAndDuplicateSetter' with the implicit setter. +// int? extensionInstanceFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:112:14: Error: 'duplicateExtensionInstanceFieldAndSetter1' is already declared in this scope. // final int? duplicateExtensionInstanceFieldAndSetter1 = null; @@ -202,6 +391,13 @@ library; // int? duplicateExtensionInstanceFieldAndSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:113:12: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndSetter1'. +// void set duplicateExtensionInstanceFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:111:8: Context: Field 'duplicateExtensionInstanceFieldAndSetter1' with the implicit setter. +// int? duplicateExtensionInstanceFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:116:8: Error: 'duplicateExtensionInstanceFieldAndSetter2' is already declared in this scope. // int? duplicateExtensionInstanceFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -209,12 +405,26 @@ library; // final int? duplicateExtensionInstanceFieldAndSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:124:19: Error: 'extensionStaticFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:120:19: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndSetter'. +// static void set extensionStaticFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:119:15: Context: Field 'extensionStaticFieldAndSetter' with the implicit setter. +// static int? extensionStaticFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:123:19: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndDuplicateSetter'. // static void set extensionStaticFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:123:19: Context: Previous declaration of 'extensionStaticFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:122:15: Context: Field 'extensionStaticFieldAndDuplicateSetter' with the implicit setter. +// static int? extensionStaticFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:124:19: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndDuplicateSetter'. // static void set extensionStaticFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:122:15: Context: Field 'extensionStaticFieldAndDuplicateSetter' with the implicit setter. +// static int? extensionStaticFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:127:21: Error: 'duplicateExtensionStaticFieldAndSetter1' is already declared in this scope. // static final int? duplicateExtensionStaticFieldAndSetter1 = null; @@ -223,6 +433,13 @@ library; // static int? duplicateExtensionStaticFieldAndSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:128:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionStaticFieldAndSetter1'. +// static void set duplicateExtensionStaticFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:126:15: Context: Field 'duplicateExtensionStaticFieldAndSetter1' with the implicit setter. +// static int? duplicateExtensionStaticFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:131:15: Error: 'duplicateExtensionStaticFieldAndSetter2' is already declared in this scope. // static int? duplicateExtensionStaticFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -230,26 +447,68 @@ library; // static final int? duplicateExtensionStaticFieldAndSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:139:19: Error: 'extensionStaticLateFinalFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:135:19: Error: Conflicts with the implicit setter of the field 'extensionStaticLateFinalFieldAndSetter'. +// static void set extensionStaticLateFinalFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:134:26: Context: Field 'extensionStaticLateFinalFieldAndSetter' with the implicit setter. +// static late final int? extensionStaticLateFinalFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:138:19: Error: Conflicts with the implicit setter of the field 'extensionStaticLateFinalFieldAndDuplicateSetter'. // static void set extensionStaticLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:138:19: Context: Previous declaration of 'extensionStaticLateFinalFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:137:26: Context: Field 'extensionStaticLateFinalFieldAndDuplicateSetter' with the implicit setter. +// static late final int? extensionStaticLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:139:19: Error: Conflicts with the implicit setter of the field 'extensionStaticLateFinalFieldAndDuplicateSetter'. // static void set extensionStaticLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:137:26: Context: Field 'extensionStaticLateFinalFieldAndDuplicateSetter' with the implicit setter. +// static late final int? extensionStaticLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:146:12: Error: 'extensionStaticFieldAndInstanceDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:142:12: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndInstanceSetter'. +// void set extensionStaticFieldAndInstanceSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:141:15: Context: Field 'extensionStaticFieldAndInstanceSetter' with the implicit setter. +// static int? extensionStaticFieldAndInstanceSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:145:12: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndInstanceDuplicateSetter'. // void set extensionStaticFieldAndInstanceDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:145:12: Context: Previous declaration of 'extensionStaticFieldAndInstanceDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:144:15: Context: Field 'extensionStaticFieldAndInstanceDuplicateSetter' with the implicit setter. +// static int? extensionStaticFieldAndInstanceDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:146:12: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndInstanceDuplicateSetter'. // void set extensionStaticFieldAndInstanceDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:144:15: Context: Field 'extensionStaticFieldAndInstanceDuplicateSetter' with the implicit setter. +// static int? extensionStaticFieldAndInstanceDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:153:19: Error: 'extensionInstanceFieldAndStaticDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:149:19: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndStaticSetter'. +// static void set extensionInstanceFieldAndStaticSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:148:8: Context: Field 'extensionInstanceFieldAndStaticSetter' with the implicit setter. +// int? extensionInstanceFieldAndStaticSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:152:19: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndStaticDuplicateSetter'. // static void set extensionInstanceFieldAndStaticDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:152:19: Context: Previous declaration of 'extensionInstanceFieldAndStaticDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:151:8: Context: Field 'extensionInstanceFieldAndStaticDuplicateSetter' with the implicit setter. +// int? extensionInstanceFieldAndStaticDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:153:19: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndStaticDuplicateSetter'. // static void set extensionInstanceFieldAndStaticDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:151:8: Context: Field 'extensionInstanceFieldAndStaticDuplicateSetter' with the implicit setter. +// int? extensionInstanceFieldAndStaticDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:156:14: Error: 'duplicateExtensionInstanceFieldAndStaticSetter1' is already declared in this scope. // final int? duplicateExtensionInstanceFieldAndStaticSetter1 = null; @@ -258,6 +517,13 @@ library; // int? duplicateExtensionInstanceFieldAndStaticSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:157:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndStaticSetter1'. +// static void set duplicateExtensionInstanceFieldAndStaticSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:155:8: Context: Field 'duplicateExtensionInstanceFieldAndStaticSetter1' with the implicit setter. +// int? duplicateExtensionInstanceFieldAndStaticSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:160:8: Error: 'duplicateExtensionInstanceFieldAndStaticSetter2' is already declared in this scope. // int? duplicateExtensionInstanceFieldAndStaticSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -265,6 +531,20 @@ library; // final int? duplicateExtensionInstanceFieldAndStaticSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:161:19: Error: Static property 'duplicateExtensionInstanceFieldAndStaticSetter2' conflicts with instance property of the same name. +// static void set duplicateExtensionInstanceFieldAndStaticSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:159:14: Context: Conflicting instance property 'duplicateExtensionInstanceFieldAndStaticSetter2'. +// final int? duplicateExtensionInstanceFieldAndStaticSetter2 = null; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:161:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndStaticSetter2'. +// static void set duplicateExtensionInstanceFieldAndStaticSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:160:8: Context: Field 'duplicateExtensionInstanceFieldAndStaticSetter2' with the implicit setter. +// int? duplicateExtensionInstanceFieldAndStaticSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:164:21: Error: 'duplicateExtensionStaticFieldAndInstanceSetter1' is already declared in this scope. // static final int? duplicateExtensionStaticFieldAndInstanceSetter1 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -272,6 +552,13 @@ library; // static int? duplicateExtensionStaticFieldAndInstanceSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:165:12: Error: Conflicts with the implicit setter of the field 'duplicateExtensionStaticFieldAndInstanceSetter1'. +// void set duplicateExtensionStaticFieldAndInstanceSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:163:15: Context: Field 'duplicateExtensionStaticFieldAndInstanceSetter1' with the implicit setter. +// static int? duplicateExtensionStaticFieldAndInstanceSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:168:15: Error: 'duplicateExtensionStaticFieldAndInstanceSetter2' is already declared in this scope. // static int? duplicateExtensionStaticFieldAndInstanceSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -279,425 +566,19 @@ library; // static final int? duplicateExtensionStaticFieldAndInstanceSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:6:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndSetter'. -// void set topLevelFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:5:6: Error: Conflicts with setter 'topLevelFieldAndSetter'. -// int? topLevelFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:10:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndDuplicateSetter'. -// void set topLevelFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:9:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndDuplicateSetter'. -// void set topLevelFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:8:6: Error: Conflicts with setter 'topLevelFieldAndDuplicateSetter'. -// int? topLevelFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:14:10: Error: Conflicts with the implicit setter of the field 'duplicateTopLevelFieldAndSetter1'. -// void set duplicateTopLevelFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:12:6: Error: Conflicts with setter 'duplicateTopLevelFieldAndSetter1'. -// int? duplicateTopLevelFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:18:10: Error: Conflicts with the implicit setter of the field 'duplicateTopLevelFieldAndSetter2'. -// void set duplicateTopLevelFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:17:6: Error: Conflicts with setter 'duplicateTopLevelFieldAndSetter2'. -// int? duplicateTopLevelFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:21:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndSetter'. -// void set topLevelLateFinalFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:20:17: Error: Conflicts with setter 'topLevelLateFinalFieldAndSetter'. -// late final int? topLevelLateFinalFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:25:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndDuplicateSetter'. -// void set topLevelLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:24:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndDuplicateSetter'. -// void set topLevelLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:23:17: Error: Conflicts with setter 'topLevelLateFinalFieldAndDuplicateSetter'. -// late final int? topLevelLateFinalFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:29:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter'. -// void set instanceFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:28:8: Error: Conflicts with setter 'instanceFieldAndSetter'. -// int? instanceFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:33:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndDuplicateSetter'. -// void set instanceFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:32:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndDuplicateSetter'. -// void set instanceFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:31:8: Error: Conflicts with setter 'instanceFieldAndDuplicateSetter'. -// int? instanceFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:37:12: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndSetter1'. -// void set duplicateInstanceFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:35:8: Error: Conflicts with setter 'duplicateInstanceFieldAndSetter1'. -// int? duplicateInstanceFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:41:12: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndSetter2'. -// void set duplicateInstanceFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:40:8: Error: Conflicts with setter 'duplicateInstanceFieldAndSetter2'. -// int? duplicateInstanceFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:44:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter'. -// void set instanceLateFinalFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:43:19: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter'. -// late final int? instanceLateFinalFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:48:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndDuplicateSetter'. -// void set instanceLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:47:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndDuplicateSetter'. -// void set instanceLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:46:19: Error: Conflicts with setter 'instanceLateFinalFieldAndDuplicateSetter'. -// late final int? instanceLateFinalFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:51:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter'. -// static void set staticFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:50:15: Error: Conflicts with setter 'staticFieldAndSetter'. -// static int? staticFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:55:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndDuplicateSetter'. -// static void set staticFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:54:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndDuplicateSetter'. -// static void set staticFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:53:15: Error: Conflicts with setter 'staticFieldAndDuplicateSetter'. -// static int? staticFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:59:19: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndSetter1'. -// static void set duplicateStaticFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:57:15: Error: Conflicts with setter 'duplicateStaticFieldAndSetter1'. -// static int? duplicateStaticFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:63:19: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndSetter2'. -// static void set duplicateStaticFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:62:15: Error: Conflicts with setter 'duplicateStaticFieldAndSetter2'. -// static int? duplicateStaticFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:66:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter'. -// static void set staticLateFinalFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:65:26: Error: Conflicts with setter 'staticLateFinalFieldAndSetter'. -// static late final int? staticLateFinalFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:70:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndDuplicateSetter'. -// static void set staticLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:69:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndDuplicateSetter'. -// static void set staticLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:68:26: Error: Conflicts with setter 'staticLateFinalFieldAndDuplicateSetter'. -// static late final int? staticLateFinalFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:73:12: Error: Conflicts with the implicit setter of the field 'staticFieldAndInstanceSetter'. -// void set staticFieldAndInstanceSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:72:15: Error: Conflicts with setter 'staticFieldAndInstanceSetter'. -// static int? staticFieldAndInstanceSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:77:12: Error: Conflicts with the implicit setter of the field 'staticFieldAndInstanceDuplicateSetter'. -// void set staticFieldAndInstanceDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:76:12: Error: Conflicts with the implicit setter of the field 'staticFieldAndInstanceDuplicateSetter'. -// void set staticFieldAndInstanceDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:75:15: Error: Conflicts with setter 'staticFieldAndInstanceDuplicateSetter'. -// static int? staticFieldAndInstanceDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:80:19: Error: Conflicts with the implicit setter of the field 'instanceFieldAndStaticSetter'. -// static void set instanceFieldAndStaticSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:79:8: Error: Conflicts with setter 'instanceFieldAndStaticSetter'. -// int? instanceFieldAndStaticSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:84:19: Error: Conflicts with the implicit setter of the field 'instanceFieldAndStaticDuplicateSetter'. -// static void set instanceFieldAndStaticDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:83:19: Error: Conflicts with the implicit setter of the field 'instanceFieldAndStaticDuplicateSetter'. -// static void set instanceFieldAndStaticDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:82:8: Error: Conflicts with setter 'instanceFieldAndStaticDuplicateSetter'. -// int? instanceFieldAndStaticDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:88:19: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndStaticSetter1'. -// static void set duplicateInstanceFieldAndStaticSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:86:8: Error: Conflicts with setter 'duplicateInstanceFieldAndStaticSetter1'. -// int? duplicateInstanceFieldAndStaticSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:92:19: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndStaticSetter2'. -// static void set duplicateInstanceFieldAndStaticSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:91:8: Error: Conflicts with setter 'duplicateInstanceFieldAndStaticSetter2'. -// int? duplicateInstanceFieldAndStaticSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:96:12: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndInstanceSetter1'. -// void set duplicateStaticFieldAndInstanceSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:94:15: Error: Conflicts with setter 'duplicateStaticFieldAndInstanceSetter1'. -// static int? duplicateStaticFieldAndInstanceSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:100:12: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndInstanceSetter2'. -// void set duplicateStaticFieldAndInstanceSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:99:15: Error: Conflicts with setter 'duplicateStaticFieldAndInstanceSetter2'. -// static int? duplicateStaticFieldAndInstanceSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:105:12: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndSetter'. -// void set extensionInstanceFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:104:8: Error: Conflicts with setter 'extensionInstanceFieldAndSetter'. -// int? extensionInstanceFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:109:12: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndDuplicateSetter'. -// void set extensionInstanceFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:108:12: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndDuplicateSetter'. -// void set extensionInstanceFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:107:8: Error: Conflicts with setter 'extensionInstanceFieldAndDuplicateSetter'. -// int? extensionInstanceFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:113:12: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndSetter1'. -// void set duplicateExtensionInstanceFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:111:8: Error: Conflicts with setter 'duplicateExtensionInstanceFieldAndSetter1'. -// int? duplicateExtensionInstanceFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:117:12: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndSetter2'. -// void set duplicateExtensionInstanceFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:116:8: Error: Conflicts with setter 'duplicateExtensionInstanceFieldAndSetter2'. -// int? duplicateExtensionInstanceFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:120:19: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndSetter'. -// static void set extensionStaticFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:119:15: Error: Conflicts with setter 'extensionStaticFieldAndSetter'. -// static int? extensionStaticFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:124:19: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndDuplicateSetter'. -// static void set extensionStaticFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:123:19: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndDuplicateSetter'. -// static void set extensionStaticFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:122:15: Error: Conflicts with setter 'extensionStaticFieldAndDuplicateSetter'. -// static int? extensionStaticFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:128:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionStaticFieldAndSetter1'. -// static void set duplicateExtensionStaticFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:126:15: Error: Conflicts with setter 'duplicateExtensionStaticFieldAndSetter1'. -// static int? duplicateExtensionStaticFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:132:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionStaticFieldAndSetter2'. -// static void set duplicateExtensionStaticFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:131:15: Error: Conflicts with setter 'duplicateExtensionStaticFieldAndSetter2'. -// static int? duplicateExtensionStaticFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:135:19: Error: Conflicts with the implicit setter of the field 'extensionStaticLateFinalFieldAndSetter'. -// static void set extensionStaticLateFinalFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:134:26: Error: Conflicts with setter 'extensionStaticLateFinalFieldAndSetter'. -// static late final int? extensionStaticLateFinalFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:139:19: Error: Conflicts with the implicit setter of the field 'extensionStaticLateFinalFieldAndDuplicateSetter'. -// static void set extensionStaticLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:138:19: Error: Conflicts with the implicit setter of the field 'extensionStaticLateFinalFieldAndDuplicateSetter'. -// static void set extensionStaticLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:137:26: Error: Conflicts with setter 'extensionStaticLateFinalFieldAndDuplicateSetter'. -// static late final int? extensionStaticLateFinalFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:142:12: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndInstanceSetter'. -// void set extensionStaticFieldAndInstanceSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:141:15: Error: Conflicts with setter 'extensionStaticFieldAndInstanceSetter'. -// static int? extensionStaticFieldAndInstanceSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:146:12: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndInstanceDuplicateSetter'. -// void set extensionStaticFieldAndInstanceDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:145:12: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndInstanceDuplicateSetter'. -// void set extensionStaticFieldAndInstanceDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:144:15: Error: Conflicts with setter 'extensionStaticFieldAndInstanceDuplicateSetter'. -// static int? extensionStaticFieldAndInstanceDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:149:19: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndStaticSetter'. -// static void set extensionInstanceFieldAndStaticSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:148:8: Error: Conflicts with setter 'extensionInstanceFieldAndStaticSetter'. -// int? extensionInstanceFieldAndStaticSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:153:19: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndStaticDuplicateSetter'. -// static void set extensionInstanceFieldAndStaticDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:152:19: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndStaticDuplicateSetter'. -// static void set extensionInstanceFieldAndStaticDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:151:8: Error: Conflicts with setter 'extensionInstanceFieldAndStaticDuplicateSetter'. -// int? extensionInstanceFieldAndStaticDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:157:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndStaticSetter1'. -// static void set duplicateExtensionInstanceFieldAndStaticSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:155:8: Error: Conflicts with setter 'duplicateExtensionInstanceFieldAndStaticSetter1'. -// int? duplicateExtensionInstanceFieldAndStaticSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:156:14: Error: Conflicts with setter 'duplicateExtensionInstanceFieldAndStaticSetter1'. -// final int? duplicateExtensionInstanceFieldAndStaticSetter1 = null; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:161:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndStaticSetter2'. -// static void set duplicateExtensionInstanceFieldAndStaticSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:160:8: Error: Conflicts with setter 'duplicateExtensionInstanceFieldAndStaticSetter2'. -// int? duplicateExtensionInstanceFieldAndStaticSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:159:14: Error: Conflicts with setter 'duplicateExtensionInstanceFieldAndStaticSetter2'. -// final int? duplicateExtensionInstanceFieldAndStaticSetter2 = null; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:165:12: Error: Conflicts with the implicit setter of the field 'duplicateExtensionStaticFieldAndInstanceSetter1'. -// void set duplicateExtensionStaticFieldAndInstanceSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:163:15: Error: Conflicts with setter 'duplicateExtensionStaticFieldAndInstanceSetter1'. -// static int? duplicateExtensionStaticFieldAndInstanceSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:164:21: Error: Conflicts with setter 'duplicateExtensionStaticFieldAndInstanceSetter1'. -// static final int? duplicateExtensionStaticFieldAndInstanceSetter1 = null; -// ^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:169:12: Error: Instance property 'duplicateExtensionStaticFieldAndInstanceSetter2' conflicts with static property of the same name. +// void set duplicateExtensionStaticFieldAndInstanceSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:167:21: Context: Conflicting static property 'duplicateExtensionStaticFieldAndInstanceSetter2'. +// static final int? duplicateExtensionStaticFieldAndInstanceSetter2 = null; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:169:12: Error: Conflicts with the implicit setter of the field 'duplicateExtensionStaticFieldAndInstanceSetter2'. // void set duplicateExtensionStaticFieldAndInstanceSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:168:15: Error: Conflicts with setter 'duplicateExtensionStaticFieldAndInstanceSetter2'. +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:168:15: Context: Field 'duplicateExtensionStaticFieldAndInstanceSetter2' with the implicit setter. // static int? duplicateExtensionStaticFieldAndInstanceSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:167:21: Error: Conflicts with setter 'duplicateExtensionStaticFieldAndInstanceSetter2'. -// static final int? duplicateExtensionStaticFieldAndInstanceSetter2 = null; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:178:38: Error: Can't use 'duplicateTopLevelFieldAndSetter1' because it is declared more than once. // duplicateTopLevelFieldAndSetter1 = duplicateTopLevelFieldAndSetter1; @@ -948,11 +829,6 @@ library; // 0.duplicateExtensionInstanceFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:238:5: Error: The setter 'duplicateExtensionInstanceFieldAndSetter2' isn't defined for the class 'int'. -// Try correcting the name to the name of an existing setter, or defining a setter or field named 'duplicateExtensionInstanceFieldAndSetter2'. -// 0.duplicateExtensionInstanceFieldAndSetter2 = -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:257:5: Error: The setter 'extensionStaticFieldAndInstanceSetter' isn't defined for the class 'int'. // Try correcting the name to the name of an existing setter, or defining a setter or field named 'extensionStaticFieldAndInstanceSetter'. // 0.extensionStaticFieldAndInstanceSetter = @@ -1040,6 +916,8 @@ class Class extends core::Object { synthetic constructor •() → self::Class : super core::Object::•() ; + set duplicateInstanceFieldAndSetter2(core::int? value) → void {} + static set duplicateStaticFieldAndSetter2(core::int? value) → void {} } extension Extension on core::int? { field extensionInstanceFieldAndSetter = self::Extension|extensionInstanceFieldAndSetter; @@ -1060,6 +938,8 @@ extension Extension on core::int? { field duplicateExtensionInstanceFieldAndStaticSetter2 = self::Extension|duplicateExtensionInstanceFieldAndStaticSetter2; static field duplicateExtensionStaticFieldAndInstanceSetter1 = self::Extension|duplicateExtensionStaticFieldAndInstanceSetter1; static field duplicateExtensionStaticFieldAndInstanceSetter2 = self::Extension|duplicateExtensionStaticFieldAndInstanceSetter2; + set duplicateExtensionInstanceFieldAndSetter2 = self::Extension|set#duplicateExtensionInstanceFieldAndSetter2; + static set duplicateExtensionStaticFieldAndSetter2 = set self::Extension|duplicateExtensionStaticFieldAndSetter2; } static field core::int? topLevelFieldAndSetter; static field core::int? topLevelFieldAndDuplicateSetter; @@ -1085,6 +965,9 @@ static field core::int? Extension|duplicateExtensionInstanceFieldAndStaticSetter static final field core::int? Extension|duplicateExtensionInstanceFieldAndStaticSetter2 = null; static field core::int? Extension|duplicateExtensionStaticFieldAndInstanceSetter1; static final field core::int? Extension|duplicateExtensionStaticFieldAndInstanceSetter2 = null; +static set duplicateTopLevelFieldAndSetter2(core::int? value) → void {} +static extension-member method Extension|set#duplicateExtensionInstanceFieldAndSetter2(lowered final core::int? #this, core::int? value) → void {} +static extension-member set Extension|duplicateExtensionStaticFieldAndSetter2(core::int? value) → void {} static method test() → dynamic { self::topLevelFieldAndSetter = self::topLevelFieldAndSetter; self::topLevelFieldAndDuplicateSetter = self::topLevelFieldAndDuplicateSetter; @@ -1184,13 +1067,10 @@ Try correcting the name to the name of an existing setter, or defining a setter Try correcting the name to the name of an existing getter, or defining a getter or field named 'duplicateExtensionInstanceFieldAndSetter1'. 0.duplicateExtensionInstanceFieldAndSetter1; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" in 0{}.duplicateExtensionInstanceFieldAndSetter1; - invalid-expression "pkg/front_end/testcases/nnbd/field_vs_setter.dart:238:5: Error: The setter 'duplicateExtensionInstanceFieldAndSetter2' isn't defined for the class 'int'. -Try correcting the name to the name of an existing setter, or defining a setter or field named 'duplicateExtensionInstanceFieldAndSetter2'. - 0.duplicateExtensionInstanceFieldAndSetter2 = - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" in 0.{}duplicateExtensionInstanceFieldAndSetter2 = invalid-expression "pkg/front_end/testcases/nnbd/field_vs_setter.dart:239:9: Error: The getter 'duplicateExtensionInstanceFieldAndSetter2' isn't defined for the class 'int'. + self::Extension|set#duplicateExtensionInstanceFieldAndSetter2(0, invalid-expression "pkg/front_end/testcases/nnbd/field_vs_setter.dart:239:9: Error: The getter 'duplicateExtensionInstanceFieldAndSetter2' isn't defined for the class 'int'. Try correcting the name to the name of an existing getter, or defining a getter or field named 'duplicateExtensionInstanceFieldAndSetter2'. 0.duplicateExtensionInstanceFieldAndSetter2; - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" in 0{}.duplicateExtensionInstanceFieldAndSetter2; + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" in 0{}.duplicateExtensionInstanceFieldAndSetter2 as{TypeError,ForDynamic} core::int?); self::Extension|extensionStaticFieldAndSetter = self::Extension|extensionStaticFieldAndSetter; self::Extension|extensionStaticFieldAndDuplicateSetter = self::Extension|extensionStaticFieldAndDuplicateSetter; self::Extension|extensionStaticLateFinalFieldAndSetter = self::Extension|extensionStaticLateFinalFieldAndSetter; diff --git a/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.outline.expect b/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.outline.expect index ebfe8c82f9e0..f47ec535a1d6 100644 --- a/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.outline.expect +++ b/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.outline.expect @@ -62,12 +62,26 @@ library; // int? duplicateExtensionInstanceFieldAndStaticSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:10:10: Error: 'topLevelFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:6:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndSetter'. +// void set topLevelFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:5:6: Context: Field 'topLevelFieldAndSetter' with the implicit setter. +// int? topLevelFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:9:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndDuplicateSetter'. // void set topLevelFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:9:10: Context: Previous declaration of 'topLevelFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:8:6: Context: Field 'topLevelFieldAndDuplicateSetter' with the implicit setter. +// int? topLevelFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:10:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndDuplicateSetter'. // void set topLevelFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:8:6: Context: Field 'topLevelFieldAndDuplicateSetter' with the implicit setter. +// int? topLevelFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:13:12: Error: 'duplicateTopLevelFieldAndSetter1' is already declared in this scope. // final int? duplicateTopLevelFieldAndSetter1 = null; @@ -76,6 +90,13 @@ library; // int? duplicateTopLevelFieldAndSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:14:10: Error: Conflicts with the implicit setter of the field 'duplicateTopLevelFieldAndSetter1'. +// void set duplicateTopLevelFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:12:6: Context: Field 'duplicateTopLevelFieldAndSetter1' with the implicit setter. +// int? duplicateTopLevelFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:17:6: Error: 'duplicateTopLevelFieldAndSetter2' is already declared in this scope. // int? duplicateTopLevelFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -83,19 +104,47 @@ library; // final int? duplicateTopLevelFieldAndSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:25:10: Error: 'topLevelLateFinalFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:21:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndSetter'. +// void set topLevelLateFinalFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:20:17: Context: Field 'topLevelLateFinalFieldAndSetter' with the implicit setter. +// late final int? topLevelLateFinalFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:24:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndDuplicateSetter'. // void set topLevelLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:24:10: Context: Previous declaration of 'topLevelLateFinalFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:23:17: Context: Field 'topLevelLateFinalFieldAndDuplicateSetter' with the implicit setter. +// late final int? topLevelLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:25:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndDuplicateSetter'. // void set topLevelLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:23:17: Context: Field 'topLevelLateFinalFieldAndDuplicateSetter' with the implicit setter. +// late final int? topLevelLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:33:12: Error: 'instanceFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:29:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter'. +// void set instanceFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:28:8: Context: Field 'instanceFieldAndSetter' with the implicit setter. +// int? instanceFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:32:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndDuplicateSetter'. // void set instanceFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:32:12: Context: Previous declaration of 'instanceFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:31:8: Context: Field 'instanceFieldAndDuplicateSetter' with the implicit setter. +// int? instanceFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:33:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndDuplicateSetter'. // void set instanceFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:31:8: Context: Field 'instanceFieldAndDuplicateSetter' with the implicit setter. +// int? instanceFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:36:14: Error: 'duplicateInstanceFieldAndSetter1' is already declared in this scope. // final int? duplicateInstanceFieldAndSetter1 = null; @@ -104,6 +153,13 @@ library; // int? duplicateInstanceFieldAndSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:37:12: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndSetter1'. +// void set duplicateInstanceFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:35:8: Context: Field 'duplicateInstanceFieldAndSetter1' with the implicit setter. +// int? duplicateInstanceFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:40:8: Error: 'duplicateInstanceFieldAndSetter2' is already declared in this scope. // int? duplicateInstanceFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -111,19 +167,47 @@ library; // final int? duplicateInstanceFieldAndSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:48:12: Error: 'instanceLateFinalFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:44:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter'. +// void set instanceLateFinalFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:43:19: Context: Field 'instanceLateFinalFieldAndSetter' with the implicit setter. +// late final int? instanceLateFinalFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:47:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndDuplicateSetter'. // void set instanceLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:47:12: Context: Previous declaration of 'instanceLateFinalFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:46:19: Context: Field 'instanceLateFinalFieldAndDuplicateSetter' with the implicit setter. +// late final int? instanceLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:48:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndDuplicateSetter'. // void set instanceLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:46:19: Context: Field 'instanceLateFinalFieldAndDuplicateSetter' with the implicit setter. +// late final int? instanceLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:55:19: Error: 'staticFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:51:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter'. +// static void set staticFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:50:15: Context: Field 'staticFieldAndSetter' with the implicit setter. +// static int? staticFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:54:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndDuplicateSetter'. // static void set staticFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:54:19: Context: Previous declaration of 'staticFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:53:15: Context: Field 'staticFieldAndDuplicateSetter' with the implicit setter. +// static int? staticFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:55:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndDuplicateSetter'. // static void set staticFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:53:15: Context: Field 'staticFieldAndDuplicateSetter' with the implicit setter. +// static int? staticFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:58:21: Error: 'duplicateStaticFieldAndSetter1' is already declared in this scope. // static final int? duplicateStaticFieldAndSetter1 = null; @@ -132,6 +216,13 @@ library; // static int? duplicateStaticFieldAndSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:59:19: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndSetter1'. +// static void set duplicateStaticFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:57:15: Context: Field 'duplicateStaticFieldAndSetter1' with the implicit setter. +// static int? duplicateStaticFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:62:15: Error: 'duplicateStaticFieldAndSetter2' is already declared in this scope. // static int? duplicateStaticFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -139,26 +230,68 @@ library; // static final int? duplicateStaticFieldAndSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:70:19: Error: 'staticLateFinalFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:66:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter'. +// static void set staticLateFinalFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:65:26: Context: Field 'staticLateFinalFieldAndSetter' with the implicit setter. +// static late final int? staticLateFinalFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:69:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndDuplicateSetter'. // static void set staticLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:69:19: Context: Previous declaration of 'staticLateFinalFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:68:26: Context: Field 'staticLateFinalFieldAndDuplicateSetter' with the implicit setter. +// static late final int? staticLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:70:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndDuplicateSetter'. // static void set staticLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:68:26: Context: Field 'staticLateFinalFieldAndDuplicateSetter' with the implicit setter. +// static late final int? staticLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:77:12: Error: 'staticFieldAndInstanceDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:73:12: Error: Conflicts with the implicit setter of the field 'staticFieldAndInstanceSetter'. +// void set staticFieldAndInstanceSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:72:15: Context: Field 'staticFieldAndInstanceSetter' with the implicit setter. +// static int? staticFieldAndInstanceSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:76:12: Error: Conflicts with the implicit setter of the field 'staticFieldAndInstanceDuplicateSetter'. // void set staticFieldAndInstanceDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:76:12: Context: Previous declaration of 'staticFieldAndInstanceDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:75:15: Context: Field 'staticFieldAndInstanceDuplicateSetter' with the implicit setter. +// static int? staticFieldAndInstanceDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:77:12: Error: Conflicts with the implicit setter of the field 'staticFieldAndInstanceDuplicateSetter'. // void set staticFieldAndInstanceDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:75:15: Context: Field 'staticFieldAndInstanceDuplicateSetter' with the implicit setter. +// static int? staticFieldAndInstanceDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:84:19: Error: 'instanceFieldAndStaticDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:80:19: Error: Conflicts with the implicit setter of the field 'instanceFieldAndStaticSetter'. +// static void set instanceFieldAndStaticSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:79:8: Context: Field 'instanceFieldAndStaticSetter' with the implicit setter. +// int? instanceFieldAndStaticSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:83:19: Error: Conflicts with the implicit setter of the field 'instanceFieldAndStaticDuplicateSetter'. // static void set instanceFieldAndStaticDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:83:19: Context: Previous declaration of 'instanceFieldAndStaticDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:82:8: Context: Field 'instanceFieldAndStaticDuplicateSetter' with the implicit setter. +// int? instanceFieldAndStaticDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:84:19: Error: Conflicts with the implicit setter of the field 'instanceFieldAndStaticDuplicateSetter'. // static void set instanceFieldAndStaticDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:82:8: Context: Field 'instanceFieldAndStaticDuplicateSetter' with the implicit setter. +// int? instanceFieldAndStaticDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:87:14: Error: 'duplicateInstanceFieldAndStaticSetter1' is already declared in this scope. // final int? duplicateInstanceFieldAndStaticSetter1 = null; @@ -167,6 +300,13 @@ library; // int? duplicateInstanceFieldAndStaticSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:88:19: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndStaticSetter1'. +// static void set duplicateInstanceFieldAndStaticSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:86:8: Context: Field 'duplicateInstanceFieldAndStaticSetter1' with the implicit setter. +// int? duplicateInstanceFieldAndStaticSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:91:8: Error: 'duplicateInstanceFieldAndStaticSetter2' is already declared in this scope. // int? duplicateInstanceFieldAndStaticSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -174,6 +314,20 @@ library; // final int? duplicateInstanceFieldAndStaticSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:92:19: Error: Static property 'duplicateInstanceFieldAndStaticSetter2' conflicts with instance property of the same name. +// static void set duplicateInstanceFieldAndStaticSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:90:14: Context: Conflicting instance property 'duplicateInstanceFieldAndStaticSetter2'. +// final int? duplicateInstanceFieldAndStaticSetter2 = null; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:92:19: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndStaticSetter2'. +// static void set duplicateInstanceFieldAndStaticSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:91:8: Context: Field 'duplicateInstanceFieldAndStaticSetter2' with the implicit setter. +// int? duplicateInstanceFieldAndStaticSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:95:21: Error: 'duplicateStaticFieldAndInstanceSetter1' is already declared in this scope. // static final int? duplicateStaticFieldAndInstanceSetter1 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -181,6 +335,13 @@ library; // static int? duplicateStaticFieldAndInstanceSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:96:12: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndInstanceSetter1'. +// void set duplicateStaticFieldAndInstanceSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:94:15: Context: Field 'duplicateStaticFieldAndInstanceSetter1' with the implicit setter. +// static int? duplicateStaticFieldAndInstanceSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:99:15: Error: 'duplicateStaticFieldAndInstanceSetter2' is already declared in this scope. // static int? duplicateStaticFieldAndInstanceSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -188,12 +349,40 @@ library; // static final int? duplicateStaticFieldAndInstanceSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:109:12: Error: 'extensionInstanceFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:100:12: Error: Instance property 'duplicateStaticFieldAndInstanceSetter2' conflicts with static property of the same name. +// void set duplicateStaticFieldAndInstanceSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:98:21: Context: Conflicting static property 'duplicateStaticFieldAndInstanceSetter2'. +// static final int? duplicateStaticFieldAndInstanceSetter2 = null; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:100:12: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndInstanceSetter2'. +// void set duplicateStaticFieldAndInstanceSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:99:15: Context: Field 'duplicateStaticFieldAndInstanceSetter2' with the implicit setter. +// static int? duplicateStaticFieldAndInstanceSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:105:12: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndSetter'. +// void set extensionInstanceFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:104:8: Context: Field 'extensionInstanceFieldAndSetter' with the implicit setter. +// int? extensionInstanceFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:108:12: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndDuplicateSetter'. // void set extensionInstanceFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:108:12: Context: Previous declaration of 'extensionInstanceFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:107:8: Context: Field 'extensionInstanceFieldAndDuplicateSetter' with the implicit setter. +// int? extensionInstanceFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:109:12: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndDuplicateSetter'. // void set extensionInstanceFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:107:8: Context: Field 'extensionInstanceFieldAndDuplicateSetter' with the implicit setter. +// int? extensionInstanceFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:112:14: Error: 'duplicateExtensionInstanceFieldAndSetter1' is already declared in this scope. // final int? duplicateExtensionInstanceFieldAndSetter1 = null; @@ -202,6 +391,13 @@ library; // int? duplicateExtensionInstanceFieldAndSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:113:12: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndSetter1'. +// void set duplicateExtensionInstanceFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:111:8: Context: Field 'duplicateExtensionInstanceFieldAndSetter1' with the implicit setter. +// int? duplicateExtensionInstanceFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:116:8: Error: 'duplicateExtensionInstanceFieldAndSetter2' is already declared in this scope. // int? duplicateExtensionInstanceFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -209,12 +405,26 @@ library; // final int? duplicateExtensionInstanceFieldAndSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:124:19: Error: 'extensionStaticFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:120:19: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndSetter'. +// static void set extensionStaticFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:119:15: Context: Field 'extensionStaticFieldAndSetter' with the implicit setter. +// static int? extensionStaticFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:123:19: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndDuplicateSetter'. // static void set extensionStaticFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:123:19: Context: Previous declaration of 'extensionStaticFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:122:15: Context: Field 'extensionStaticFieldAndDuplicateSetter' with the implicit setter. +// static int? extensionStaticFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:124:19: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndDuplicateSetter'. // static void set extensionStaticFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:122:15: Context: Field 'extensionStaticFieldAndDuplicateSetter' with the implicit setter. +// static int? extensionStaticFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:127:21: Error: 'duplicateExtensionStaticFieldAndSetter1' is already declared in this scope. // static final int? duplicateExtensionStaticFieldAndSetter1 = null; @@ -223,6 +433,13 @@ library; // static int? duplicateExtensionStaticFieldAndSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:128:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionStaticFieldAndSetter1'. +// static void set duplicateExtensionStaticFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:126:15: Context: Field 'duplicateExtensionStaticFieldAndSetter1' with the implicit setter. +// static int? duplicateExtensionStaticFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:131:15: Error: 'duplicateExtensionStaticFieldAndSetter2' is already declared in this scope. // static int? duplicateExtensionStaticFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -230,26 +447,68 @@ library; // static final int? duplicateExtensionStaticFieldAndSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:139:19: Error: 'extensionStaticLateFinalFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:135:19: Error: Conflicts with the implicit setter of the field 'extensionStaticLateFinalFieldAndSetter'. +// static void set extensionStaticLateFinalFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:134:26: Context: Field 'extensionStaticLateFinalFieldAndSetter' with the implicit setter. +// static late final int? extensionStaticLateFinalFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:138:19: Error: Conflicts with the implicit setter of the field 'extensionStaticLateFinalFieldAndDuplicateSetter'. // static void set extensionStaticLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:138:19: Context: Previous declaration of 'extensionStaticLateFinalFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:137:26: Context: Field 'extensionStaticLateFinalFieldAndDuplicateSetter' with the implicit setter. +// static late final int? extensionStaticLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:139:19: Error: Conflicts with the implicit setter of the field 'extensionStaticLateFinalFieldAndDuplicateSetter'. // static void set extensionStaticLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:137:26: Context: Field 'extensionStaticLateFinalFieldAndDuplicateSetter' with the implicit setter. +// static late final int? extensionStaticLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:146:12: Error: 'extensionStaticFieldAndInstanceDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:142:12: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndInstanceSetter'. +// void set extensionStaticFieldAndInstanceSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:141:15: Context: Field 'extensionStaticFieldAndInstanceSetter' with the implicit setter. +// static int? extensionStaticFieldAndInstanceSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:145:12: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndInstanceDuplicateSetter'. // void set extensionStaticFieldAndInstanceDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:145:12: Context: Previous declaration of 'extensionStaticFieldAndInstanceDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:144:15: Context: Field 'extensionStaticFieldAndInstanceDuplicateSetter' with the implicit setter. +// static int? extensionStaticFieldAndInstanceDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:146:12: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndInstanceDuplicateSetter'. // void set extensionStaticFieldAndInstanceDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:144:15: Context: Field 'extensionStaticFieldAndInstanceDuplicateSetter' with the implicit setter. +// static int? extensionStaticFieldAndInstanceDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:149:19: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndStaticSetter'. +// static void set extensionInstanceFieldAndStaticSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:148:8: Context: Field 'extensionInstanceFieldAndStaticSetter' with the implicit setter. +// int? extensionInstanceFieldAndStaticSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:153:19: Error: 'extensionInstanceFieldAndStaticDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:152:19: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndStaticDuplicateSetter'. // static void set extensionInstanceFieldAndStaticDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:152:19: Context: Previous declaration of 'extensionInstanceFieldAndStaticDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:151:8: Context: Field 'extensionInstanceFieldAndStaticDuplicateSetter' with the implicit setter. +// int? extensionInstanceFieldAndStaticDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:153:19: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndStaticDuplicateSetter'. // static void set extensionInstanceFieldAndStaticDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:151:8: Context: Field 'extensionInstanceFieldAndStaticDuplicateSetter' with the implicit setter. +// int? extensionInstanceFieldAndStaticDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:156:14: Error: 'duplicateExtensionInstanceFieldAndStaticSetter1' is already declared in this scope. // final int? duplicateExtensionInstanceFieldAndStaticSetter1 = null; @@ -258,6 +517,13 @@ library; // int? duplicateExtensionInstanceFieldAndStaticSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:157:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndStaticSetter1'. +// static void set duplicateExtensionInstanceFieldAndStaticSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:155:8: Context: Field 'duplicateExtensionInstanceFieldAndStaticSetter1' with the implicit setter. +// int? duplicateExtensionInstanceFieldAndStaticSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:160:8: Error: 'duplicateExtensionInstanceFieldAndStaticSetter2' is already declared in this scope. // int? duplicateExtensionInstanceFieldAndStaticSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -265,6 +531,20 @@ library; // final int? duplicateExtensionInstanceFieldAndStaticSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:161:19: Error: Static property 'duplicateExtensionInstanceFieldAndStaticSetter2' conflicts with instance property of the same name. +// static void set duplicateExtensionInstanceFieldAndStaticSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:159:14: Context: Conflicting instance property 'duplicateExtensionInstanceFieldAndStaticSetter2'. +// final int? duplicateExtensionInstanceFieldAndStaticSetter2 = null; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:161:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndStaticSetter2'. +// static void set duplicateExtensionInstanceFieldAndStaticSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:160:8: Context: Field 'duplicateExtensionInstanceFieldAndStaticSetter2' with the implicit setter. +// int? duplicateExtensionInstanceFieldAndStaticSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:164:21: Error: 'duplicateExtensionStaticFieldAndInstanceSetter1' is already declared in this scope. // static final int? duplicateExtensionStaticFieldAndInstanceSetter1 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -272,6 +552,13 @@ library; // static int? duplicateExtensionStaticFieldAndInstanceSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:165:12: Error: Conflicts with the implicit setter of the field 'duplicateExtensionStaticFieldAndInstanceSetter1'. +// void set duplicateExtensionStaticFieldAndInstanceSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:163:15: Context: Field 'duplicateExtensionStaticFieldAndInstanceSetter1' with the implicit setter. +// static int? duplicateExtensionStaticFieldAndInstanceSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:168:15: Error: 'duplicateExtensionStaticFieldAndInstanceSetter2' is already declared in this scope. // static int? duplicateExtensionStaticFieldAndInstanceSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -279,425 +566,19 @@ library; // static final int? duplicateExtensionStaticFieldAndInstanceSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:6:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndSetter'. -// void set topLevelFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:5:6: Error: Conflicts with setter 'topLevelFieldAndSetter'. -// int? topLevelFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:10:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndDuplicateSetter'. -// void set topLevelFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:9:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndDuplicateSetter'. -// void set topLevelFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:8:6: Error: Conflicts with setter 'topLevelFieldAndDuplicateSetter'. -// int? topLevelFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:14:10: Error: Conflicts with the implicit setter of the field 'duplicateTopLevelFieldAndSetter1'. -// void set duplicateTopLevelFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:12:6: Error: Conflicts with setter 'duplicateTopLevelFieldAndSetter1'. -// int? duplicateTopLevelFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:18:10: Error: Conflicts with the implicit setter of the field 'duplicateTopLevelFieldAndSetter2'. -// void set duplicateTopLevelFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:17:6: Error: Conflicts with setter 'duplicateTopLevelFieldAndSetter2'. -// int? duplicateTopLevelFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:21:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndSetter'. -// void set topLevelLateFinalFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:20:17: Error: Conflicts with setter 'topLevelLateFinalFieldAndSetter'. -// late final int? topLevelLateFinalFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:25:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndDuplicateSetter'. -// void set topLevelLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:24:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndDuplicateSetter'. -// void set topLevelLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:23:17: Error: Conflicts with setter 'topLevelLateFinalFieldAndDuplicateSetter'. -// late final int? topLevelLateFinalFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:29:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter'. -// void set instanceFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:28:8: Error: Conflicts with setter 'instanceFieldAndSetter'. -// int? instanceFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:33:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndDuplicateSetter'. -// void set instanceFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:32:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndDuplicateSetter'. -// void set instanceFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:31:8: Error: Conflicts with setter 'instanceFieldAndDuplicateSetter'. -// int? instanceFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:37:12: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndSetter1'. -// void set duplicateInstanceFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:35:8: Error: Conflicts with setter 'duplicateInstanceFieldAndSetter1'. -// int? duplicateInstanceFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:41:12: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndSetter2'. -// void set duplicateInstanceFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:40:8: Error: Conflicts with setter 'duplicateInstanceFieldAndSetter2'. -// int? duplicateInstanceFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:44:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter'. -// void set instanceLateFinalFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:43:19: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter'. -// late final int? instanceLateFinalFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:48:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndDuplicateSetter'. -// void set instanceLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:47:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndDuplicateSetter'. -// void set instanceLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:46:19: Error: Conflicts with setter 'instanceLateFinalFieldAndDuplicateSetter'. -// late final int? instanceLateFinalFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:51:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter'. -// static void set staticFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:50:15: Error: Conflicts with setter 'staticFieldAndSetter'. -// static int? staticFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:55:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndDuplicateSetter'. -// static void set staticFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:54:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndDuplicateSetter'. -// static void set staticFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:53:15: Error: Conflicts with setter 'staticFieldAndDuplicateSetter'. -// static int? staticFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:59:19: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndSetter1'. -// static void set duplicateStaticFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:57:15: Error: Conflicts with setter 'duplicateStaticFieldAndSetter1'. -// static int? duplicateStaticFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:63:19: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndSetter2'. -// static void set duplicateStaticFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:62:15: Error: Conflicts with setter 'duplicateStaticFieldAndSetter2'. -// static int? duplicateStaticFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:66:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter'. -// static void set staticLateFinalFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:65:26: Error: Conflicts with setter 'staticLateFinalFieldAndSetter'. -// static late final int? staticLateFinalFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:70:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndDuplicateSetter'. -// static void set staticLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:69:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndDuplicateSetter'. -// static void set staticLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:68:26: Error: Conflicts with setter 'staticLateFinalFieldAndDuplicateSetter'. -// static late final int? staticLateFinalFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:73:12: Error: Conflicts with the implicit setter of the field 'staticFieldAndInstanceSetter'. -// void set staticFieldAndInstanceSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:72:15: Error: Conflicts with setter 'staticFieldAndInstanceSetter'. -// static int? staticFieldAndInstanceSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:77:12: Error: Conflicts with the implicit setter of the field 'staticFieldAndInstanceDuplicateSetter'. -// void set staticFieldAndInstanceDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:76:12: Error: Conflicts with the implicit setter of the field 'staticFieldAndInstanceDuplicateSetter'. -// void set staticFieldAndInstanceDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:75:15: Error: Conflicts with setter 'staticFieldAndInstanceDuplicateSetter'. -// static int? staticFieldAndInstanceDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:80:19: Error: Conflicts with the implicit setter of the field 'instanceFieldAndStaticSetter'. -// static void set instanceFieldAndStaticSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:79:8: Error: Conflicts with setter 'instanceFieldAndStaticSetter'. -// int? instanceFieldAndStaticSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:84:19: Error: Conflicts with the implicit setter of the field 'instanceFieldAndStaticDuplicateSetter'. -// static void set instanceFieldAndStaticDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:83:19: Error: Conflicts with the implicit setter of the field 'instanceFieldAndStaticDuplicateSetter'. -// static void set instanceFieldAndStaticDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:82:8: Error: Conflicts with setter 'instanceFieldAndStaticDuplicateSetter'. -// int? instanceFieldAndStaticDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:88:19: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndStaticSetter1'. -// static void set duplicateInstanceFieldAndStaticSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:86:8: Error: Conflicts with setter 'duplicateInstanceFieldAndStaticSetter1'. -// int? duplicateInstanceFieldAndStaticSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:92:19: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndStaticSetter2'. -// static void set duplicateInstanceFieldAndStaticSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:91:8: Error: Conflicts with setter 'duplicateInstanceFieldAndStaticSetter2'. -// int? duplicateInstanceFieldAndStaticSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:96:12: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndInstanceSetter1'. -// void set duplicateStaticFieldAndInstanceSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:94:15: Error: Conflicts with setter 'duplicateStaticFieldAndInstanceSetter1'. -// static int? duplicateStaticFieldAndInstanceSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:100:12: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndInstanceSetter2'. -// void set duplicateStaticFieldAndInstanceSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:99:15: Error: Conflicts with setter 'duplicateStaticFieldAndInstanceSetter2'. -// static int? duplicateStaticFieldAndInstanceSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:105:12: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndSetter'. -// void set extensionInstanceFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:104:8: Error: Conflicts with setter 'extensionInstanceFieldAndSetter'. -// int? extensionInstanceFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:109:12: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndDuplicateSetter'. -// void set extensionInstanceFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:108:12: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndDuplicateSetter'. -// void set extensionInstanceFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:107:8: Error: Conflicts with setter 'extensionInstanceFieldAndDuplicateSetter'. -// int? extensionInstanceFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:113:12: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndSetter1'. -// void set duplicateExtensionInstanceFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:111:8: Error: Conflicts with setter 'duplicateExtensionInstanceFieldAndSetter1'. -// int? duplicateExtensionInstanceFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:117:12: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndSetter2'. -// void set duplicateExtensionInstanceFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:116:8: Error: Conflicts with setter 'duplicateExtensionInstanceFieldAndSetter2'. -// int? duplicateExtensionInstanceFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:120:19: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndSetter'. -// static void set extensionStaticFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:119:15: Error: Conflicts with setter 'extensionStaticFieldAndSetter'. -// static int? extensionStaticFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:124:19: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndDuplicateSetter'. -// static void set extensionStaticFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:123:19: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndDuplicateSetter'. -// static void set extensionStaticFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:122:15: Error: Conflicts with setter 'extensionStaticFieldAndDuplicateSetter'. -// static int? extensionStaticFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:128:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionStaticFieldAndSetter1'. -// static void set duplicateExtensionStaticFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:126:15: Error: Conflicts with setter 'duplicateExtensionStaticFieldAndSetter1'. -// static int? duplicateExtensionStaticFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:132:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionStaticFieldAndSetter2'. -// static void set duplicateExtensionStaticFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:131:15: Error: Conflicts with setter 'duplicateExtensionStaticFieldAndSetter2'. -// static int? duplicateExtensionStaticFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:135:19: Error: Conflicts with the implicit setter of the field 'extensionStaticLateFinalFieldAndSetter'. -// static void set extensionStaticLateFinalFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:134:26: Error: Conflicts with setter 'extensionStaticLateFinalFieldAndSetter'. -// static late final int? extensionStaticLateFinalFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:139:19: Error: Conflicts with the implicit setter of the field 'extensionStaticLateFinalFieldAndDuplicateSetter'. -// static void set extensionStaticLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:138:19: Error: Conflicts with the implicit setter of the field 'extensionStaticLateFinalFieldAndDuplicateSetter'. -// static void set extensionStaticLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:137:26: Error: Conflicts with setter 'extensionStaticLateFinalFieldAndDuplicateSetter'. -// static late final int? extensionStaticLateFinalFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:142:12: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndInstanceSetter'. -// void set extensionStaticFieldAndInstanceSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:141:15: Error: Conflicts with setter 'extensionStaticFieldAndInstanceSetter'. -// static int? extensionStaticFieldAndInstanceSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:146:12: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndInstanceDuplicateSetter'. -// void set extensionStaticFieldAndInstanceDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:145:12: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndInstanceDuplicateSetter'. -// void set extensionStaticFieldAndInstanceDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:144:15: Error: Conflicts with setter 'extensionStaticFieldAndInstanceDuplicateSetter'. -// static int? extensionStaticFieldAndInstanceDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:149:19: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndStaticSetter'. -// static void set extensionInstanceFieldAndStaticSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:148:8: Error: Conflicts with setter 'extensionInstanceFieldAndStaticSetter'. -// int? extensionInstanceFieldAndStaticSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:153:19: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndStaticDuplicateSetter'. -// static void set extensionInstanceFieldAndStaticDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:152:19: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndStaticDuplicateSetter'. -// static void set extensionInstanceFieldAndStaticDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:151:8: Error: Conflicts with setter 'extensionInstanceFieldAndStaticDuplicateSetter'. -// int? extensionInstanceFieldAndStaticDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:157:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndStaticSetter1'. -// static void set duplicateExtensionInstanceFieldAndStaticSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:155:8: Error: Conflicts with setter 'duplicateExtensionInstanceFieldAndStaticSetter1'. -// int? duplicateExtensionInstanceFieldAndStaticSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:156:14: Error: Conflicts with setter 'duplicateExtensionInstanceFieldAndStaticSetter1'. -// final int? duplicateExtensionInstanceFieldAndStaticSetter1 = null; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:161:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndStaticSetter2'. -// static void set duplicateExtensionInstanceFieldAndStaticSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:160:8: Error: Conflicts with setter 'duplicateExtensionInstanceFieldAndStaticSetter2'. -// int? duplicateExtensionInstanceFieldAndStaticSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:159:14: Error: Conflicts with setter 'duplicateExtensionInstanceFieldAndStaticSetter2'. -// final int? duplicateExtensionInstanceFieldAndStaticSetter2 = null; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:165:12: Error: Conflicts with the implicit setter of the field 'duplicateExtensionStaticFieldAndInstanceSetter1'. -// void set duplicateExtensionStaticFieldAndInstanceSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:163:15: Error: Conflicts with setter 'duplicateExtensionStaticFieldAndInstanceSetter1'. -// static int? duplicateExtensionStaticFieldAndInstanceSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:164:21: Error: Conflicts with setter 'duplicateExtensionStaticFieldAndInstanceSetter1'. -// static final int? duplicateExtensionStaticFieldAndInstanceSetter1 = null; -// ^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:169:12: Error: Instance property 'duplicateExtensionStaticFieldAndInstanceSetter2' conflicts with static property of the same name. +// void set duplicateExtensionStaticFieldAndInstanceSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:167:21: Context: Conflicting static property 'duplicateExtensionStaticFieldAndInstanceSetter2'. +// static final int? duplicateExtensionStaticFieldAndInstanceSetter2 = null; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:169:12: Error: Conflicts with the implicit setter of the field 'duplicateExtensionStaticFieldAndInstanceSetter2'. // void set duplicateExtensionStaticFieldAndInstanceSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:168:15: Error: Conflicts with setter 'duplicateExtensionStaticFieldAndInstanceSetter2'. +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:168:15: Context: Field 'duplicateExtensionStaticFieldAndInstanceSetter2' with the implicit setter. // static int? duplicateExtensionStaticFieldAndInstanceSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:167:21: Error: Conflicts with setter 'duplicateExtensionStaticFieldAndInstanceSetter2'. -// static final int? duplicateExtensionStaticFieldAndInstanceSetter2 = null; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // import self as self; import "dart:core" as core; @@ -725,6 +606,10 @@ class Class extends core::Object { static final field core::int? duplicateStaticFieldAndInstanceSetter2; synthetic constructor •() → self::Class ; + set duplicateInstanceFieldAndSetter2(core::int? value) → void + ; + static set duplicateStaticFieldAndSetter2(core::int? value) → void + ; } extension Extension on core::int? { field extensionInstanceFieldAndSetter = self::Extension|extensionInstanceFieldAndSetter; @@ -745,6 +630,8 @@ extension Extension on core::int? { field duplicateExtensionInstanceFieldAndStaticSetter2 = self::Extension|duplicateExtensionInstanceFieldAndStaticSetter2; static field duplicateExtensionStaticFieldAndInstanceSetter1 = self::Extension|duplicateExtensionStaticFieldAndInstanceSetter1; static field duplicateExtensionStaticFieldAndInstanceSetter2 = self::Extension|duplicateExtensionStaticFieldAndInstanceSetter2; + set duplicateExtensionInstanceFieldAndSetter2 = self::Extension|set#duplicateExtensionInstanceFieldAndSetter2; + static set duplicateExtensionStaticFieldAndSetter2 = set self::Extension|duplicateExtensionStaticFieldAndSetter2; } static field core::int? topLevelFieldAndSetter; static field core::int? topLevelFieldAndDuplicateSetter; @@ -770,6 +657,12 @@ static field core::int? Extension|duplicateExtensionInstanceFieldAndStaticSetter static final field core::int? Extension|duplicateExtensionInstanceFieldAndStaticSetter2; static field core::int? Extension|duplicateExtensionStaticFieldAndInstanceSetter1; static final field core::int? Extension|duplicateExtensionStaticFieldAndInstanceSetter2; +static set duplicateTopLevelFieldAndSetter2(core::int? value) → void + ; +static extension-member method Extension|set#duplicateExtensionInstanceFieldAndSetter2(lowered final core::int? #this, core::int? value) → void + ; +static extension-member set Extension|duplicateExtensionStaticFieldAndSetter2(core::int? value) → void + ; static method test() → dynamic ; static method main() → dynamic diff --git a/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.transformed.expect index 1a21f037684e..1e1a6013856f 100644 --- a/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.transformed.expect @@ -62,12 +62,26 @@ library; // int? duplicateExtensionInstanceFieldAndStaticSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:10:10: Error: 'topLevelFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:6:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndSetter'. +// void set topLevelFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:5:6: Context: Field 'topLevelFieldAndSetter' with the implicit setter. +// int? topLevelFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:9:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndDuplicateSetter'. // void set topLevelFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:9:10: Context: Previous declaration of 'topLevelFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:8:6: Context: Field 'topLevelFieldAndDuplicateSetter' with the implicit setter. +// int? topLevelFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:10:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndDuplicateSetter'. // void set topLevelFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:8:6: Context: Field 'topLevelFieldAndDuplicateSetter' with the implicit setter. +// int? topLevelFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:13:12: Error: 'duplicateTopLevelFieldAndSetter1' is already declared in this scope. // final int? duplicateTopLevelFieldAndSetter1 = null; @@ -76,6 +90,13 @@ library; // int? duplicateTopLevelFieldAndSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:14:10: Error: Conflicts with the implicit setter of the field 'duplicateTopLevelFieldAndSetter1'. +// void set duplicateTopLevelFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:12:6: Context: Field 'duplicateTopLevelFieldAndSetter1' with the implicit setter. +// int? duplicateTopLevelFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:17:6: Error: 'duplicateTopLevelFieldAndSetter2' is already declared in this scope. // int? duplicateTopLevelFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -83,19 +104,47 @@ library; // final int? duplicateTopLevelFieldAndSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:25:10: Error: 'topLevelLateFinalFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:21:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndSetter'. +// void set topLevelLateFinalFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:20:17: Context: Field 'topLevelLateFinalFieldAndSetter' with the implicit setter. +// late final int? topLevelLateFinalFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:24:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndDuplicateSetter'. // void set topLevelLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:24:10: Context: Previous declaration of 'topLevelLateFinalFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:23:17: Context: Field 'topLevelLateFinalFieldAndDuplicateSetter' with the implicit setter. +// late final int? topLevelLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:25:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndDuplicateSetter'. // void set topLevelLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:23:17: Context: Field 'topLevelLateFinalFieldAndDuplicateSetter' with the implicit setter. +// late final int? topLevelLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:33:12: Error: 'instanceFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:29:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter'. +// void set instanceFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:28:8: Context: Field 'instanceFieldAndSetter' with the implicit setter. +// int? instanceFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:32:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndDuplicateSetter'. // void set instanceFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:32:12: Context: Previous declaration of 'instanceFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:31:8: Context: Field 'instanceFieldAndDuplicateSetter' with the implicit setter. +// int? instanceFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:33:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndDuplicateSetter'. // void set instanceFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:31:8: Context: Field 'instanceFieldAndDuplicateSetter' with the implicit setter. +// int? instanceFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:36:14: Error: 'duplicateInstanceFieldAndSetter1' is already declared in this scope. // final int? duplicateInstanceFieldAndSetter1 = null; @@ -104,6 +153,13 @@ library; // int? duplicateInstanceFieldAndSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:37:12: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndSetter1'. +// void set duplicateInstanceFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:35:8: Context: Field 'duplicateInstanceFieldAndSetter1' with the implicit setter. +// int? duplicateInstanceFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:40:8: Error: 'duplicateInstanceFieldAndSetter2' is already declared in this scope. // int? duplicateInstanceFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -111,19 +167,47 @@ library; // final int? duplicateInstanceFieldAndSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:48:12: Error: 'instanceLateFinalFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:44:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter'. +// void set instanceLateFinalFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:43:19: Context: Field 'instanceLateFinalFieldAndSetter' with the implicit setter. +// late final int? instanceLateFinalFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:47:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndDuplicateSetter'. // void set instanceLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:47:12: Context: Previous declaration of 'instanceLateFinalFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:46:19: Context: Field 'instanceLateFinalFieldAndDuplicateSetter' with the implicit setter. +// late final int? instanceLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:48:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndDuplicateSetter'. // void set instanceLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:46:19: Context: Field 'instanceLateFinalFieldAndDuplicateSetter' with the implicit setter. +// late final int? instanceLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:55:19: Error: 'staticFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:51:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter'. +// static void set staticFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:50:15: Context: Field 'staticFieldAndSetter' with the implicit setter. +// static int? staticFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:54:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndDuplicateSetter'. // static void set staticFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:54:19: Context: Previous declaration of 'staticFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:53:15: Context: Field 'staticFieldAndDuplicateSetter' with the implicit setter. +// static int? staticFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:55:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndDuplicateSetter'. // static void set staticFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:53:15: Context: Field 'staticFieldAndDuplicateSetter' with the implicit setter. +// static int? staticFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:58:21: Error: 'duplicateStaticFieldAndSetter1' is already declared in this scope. // static final int? duplicateStaticFieldAndSetter1 = null; @@ -132,6 +216,13 @@ library; // static int? duplicateStaticFieldAndSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:59:19: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndSetter1'. +// static void set duplicateStaticFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:57:15: Context: Field 'duplicateStaticFieldAndSetter1' with the implicit setter. +// static int? duplicateStaticFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:62:15: Error: 'duplicateStaticFieldAndSetter2' is already declared in this scope. // static int? duplicateStaticFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -139,26 +230,68 @@ library; // static final int? duplicateStaticFieldAndSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:70:19: Error: 'staticLateFinalFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:66:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter'. +// static void set staticLateFinalFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:65:26: Context: Field 'staticLateFinalFieldAndSetter' with the implicit setter. +// static late final int? staticLateFinalFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:69:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndDuplicateSetter'. // static void set staticLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:69:19: Context: Previous declaration of 'staticLateFinalFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:68:26: Context: Field 'staticLateFinalFieldAndDuplicateSetter' with the implicit setter. +// static late final int? staticLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:70:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndDuplicateSetter'. // static void set staticLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:68:26: Context: Field 'staticLateFinalFieldAndDuplicateSetter' with the implicit setter. +// static late final int? staticLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:77:12: Error: 'staticFieldAndInstanceDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:73:12: Error: Conflicts with the implicit setter of the field 'staticFieldAndInstanceSetter'. +// void set staticFieldAndInstanceSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:72:15: Context: Field 'staticFieldAndInstanceSetter' with the implicit setter. +// static int? staticFieldAndInstanceSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:76:12: Error: Conflicts with the implicit setter of the field 'staticFieldAndInstanceDuplicateSetter'. // void set staticFieldAndInstanceDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:76:12: Context: Previous declaration of 'staticFieldAndInstanceDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:75:15: Context: Field 'staticFieldAndInstanceDuplicateSetter' with the implicit setter. +// static int? staticFieldAndInstanceDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:77:12: Error: Conflicts with the implicit setter of the field 'staticFieldAndInstanceDuplicateSetter'. // void set staticFieldAndInstanceDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:75:15: Context: Field 'staticFieldAndInstanceDuplicateSetter' with the implicit setter. +// static int? staticFieldAndInstanceDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:84:19: Error: 'instanceFieldAndStaticDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:80:19: Error: Conflicts with the implicit setter of the field 'instanceFieldAndStaticSetter'. +// static void set instanceFieldAndStaticSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:79:8: Context: Field 'instanceFieldAndStaticSetter' with the implicit setter. +// int? instanceFieldAndStaticSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:83:19: Error: Conflicts with the implicit setter of the field 'instanceFieldAndStaticDuplicateSetter'. // static void set instanceFieldAndStaticDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:83:19: Context: Previous declaration of 'instanceFieldAndStaticDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:82:8: Context: Field 'instanceFieldAndStaticDuplicateSetter' with the implicit setter. +// int? instanceFieldAndStaticDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:84:19: Error: Conflicts with the implicit setter of the field 'instanceFieldAndStaticDuplicateSetter'. // static void set instanceFieldAndStaticDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:82:8: Context: Field 'instanceFieldAndStaticDuplicateSetter' with the implicit setter. +// int? instanceFieldAndStaticDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:87:14: Error: 'duplicateInstanceFieldAndStaticSetter1' is already declared in this scope. // final int? duplicateInstanceFieldAndStaticSetter1 = null; @@ -167,6 +300,13 @@ library; // int? duplicateInstanceFieldAndStaticSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:88:19: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndStaticSetter1'. +// static void set duplicateInstanceFieldAndStaticSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:86:8: Context: Field 'duplicateInstanceFieldAndStaticSetter1' with the implicit setter. +// int? duplicateInstanceFieldAndStaticSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:91:8: Error: 'duplicateInstanceFieldAndStaticSetter2' is already declared in this scope. // int? duplicateInstanceFieldAndStaticSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -174,6 +314,20 @@ library; // final int? duplicateInstanceFieldAndStaticSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:92:19: Error: Static property 'duplicateInstanceFieldAndStaticSetter2' conflicts with instance property of the same name. +// static void set duplicateInstanceFieldAndStaticSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:90:14: Context: Conflicting instance property 'duplicateInstanceFieldAndStaticSetter2'. +// final int? duplicateInstanceFieldAndStaticSetter2 = null; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:92:19: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndStaticSetter2'. +// static void set duplicateInstanceFieldAndStaticSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:91:8: Context: Field 'duplicateInstanceFieldAndStaticSetter2' with the implicit setter. +// int? duplicateInstanceFieldAndStaticSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:95:21: Error: 'duplicateStaticFieldAndInstanceSetter1' is already declared in this scope. // static final int? duplicateStaticFieldAndInstanceSetter1 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -181,6 +335,13 @@ library; // static int? duplicateStaticFieldAndInstanceSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:96:12: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndInstanceSetter1'. +// void set duplicateStaticFieldAndInstanceSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:94:15: Context: Field 'duplicateStaticFieldAndInstanceSetter1' with the implicit setter. +// static int? duplicateStaticFieldAndInstanceSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:99:15: Error: 'duplicateStaticFieldAndInstanceSetter2' is already declared in this scope. // static int? duplicateStaticFieldAndInstanceSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -188,12 +349,40 @@ library; // static final int? duplicateStaticFieldAndInstanceSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:109:12: Error: 'extensionInstanceFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:100:12: Error: Instance property 'duplicateStaticFieldAndInstanceSetter2' conflicts with static property of the same name. +// void set duplicateStaticFieldAndInstanceSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:98:21: Context: Conflicting static property 'duplicateStaticFieldAndInstanceSetter2'. +// static final int? duplicateStaticFieldAndInstanceSetter2 = null; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:100:12: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndInstanceSetter2'. +// void set duplicateStaticFieldAndInstanceSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:99:15: Context: Field 'duplicateStaticFieldAndInstanceSetter2' with the implicit setter. +// static int? duplicateStaticFieldAndInstanceSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:105:12: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndSetter'. +// void set extensionInstanceFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:104:8: Context: Field 'extensionInstanceFieldAndSetter' with the implicit setter. +// int? extensionInstanceFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:108:12: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndDuplicateSetter'. // void set extensionInstanceFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:108:12: Context: Previous declaration of 'extensionInstanceFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:107:8: Context: Field 'extensionInstanceFieldAndDuplicateSetter' with the implicit setter. +// int? extensionInstanceFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:109:12: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndDuplicateSetter'. // void set extensionInstanceFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:107:8: Context: Field 'extensionInstanceFieldAndDuplicateSetter' with the implicit setter. +// int? extensionInstanceFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:112:14: Error: 'duplicateExtensionInstanceFieldAndSetter1' is already declared in this scope. // final int? duplicateExtensionInstanceFieldAndSetter1 = null; @@ -202,6 +391,13 @@ library; // int? duplicateExtensionInstanceFieldAndSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:113:12: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndSetter1'. +// void set duplicateExtensionInstanceFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:111:8: Context: Field 'duplicateExtensionInstanceFieldAndSetter1' with the implicit setter. +// int? duplicateExtensionInstanceFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:116:8: Error: 'duplicateExtensionInstanceFieldAndSetter2' is already declared in this scope. // int? duplicateExtensionInstanceFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -209,12 +405,26 @@ library; // final int? duplicateExtensionInstanceFieldAndSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:124:19: Error: 'extensionStaticFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:120:19: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndSetter'. +// static void set extensionStaticFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:119:15: Context: Field 'extensionStaticFieldAndSetter' with the implicit setter. +// static int? extensionStaticFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:123:19: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndDuplicateSetter'. // static void set extensionStaticFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:123:19: Context: Previous declaration of 'extensionStaticFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:122:15: Context: Field 'extensionStaticFieldAndDuplicateSetter' with the implicit setter. +// static int? extensionStaticFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:124:19: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndDuplicateSetter'. // static void set extensionStaticFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:122:15: Context: Field 'extensionStaticFieldAndDuplicateSetter' with the implicit setter. +// static int? extensionStaticFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:127:21: Error: 'duplicateExtensionStaticFieldAndSetter1' is already declared in this scope. // static final int? duplicateExtensionStaticFieldAndSetter1 = null; @@ -223,6 +433,13 @@ library; // static int? duplicateExtensionStaticFieldAndSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:128:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionStaticFieldAndSetter1'. +// static void set duplicateExtensionStaticFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:126:15: Context: Field 'duplicateExtensionStaticFieldAndSetter1' with the implicit setter. +// static int? duplicateExtensionStaticFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:131:15: Error: 'duplicateExtensionStaticFieldAndSetter2' is already declared in this scope. // static int? duplicateExtensionStaticFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -230,26 +447,68 @@ library; // static final int? duplicateExtensionStaticFieldAndSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:139:19: Error: 'extensionStaticLateFinalFieldAndDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:135:19: Error: Conflicts with the implicit setter of the field 'extensionStaticLateFinalFieldAndSetter'. +// static void set extensionStaticLateFinalFieldAndSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:134:26: Context: Field 'extensionStaticLateFinalFieldAndSetter' with the implicit setter. +// static late final int? extensionStaticLateFinalFieldAndSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:138:19: Error: Conflicts with the implicit setter of the field 'extensionStaticLateFinalFieldAndDuplicateSetter'. // static void set extensionStaticLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:138:19: Context: Previous declaration of 'extensionStaticLateFinalFieldAndDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:137:26: Context: Field 'extensionStaticLateFinalFieldAndDuplicateSetter' with the implicit setter. +// static late final int? extensionStaticLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:139:19: Error: Conflicts with the implicit setter of the field 'extensionStaticLateFinalFieldAndDuplicateSetter'. // static void set extensionStaticLateFinalFieldAndDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:137:26: Context: Field 'extensionStaticLateFinalFieldAndDuplicateSetter' with the implicit setter. +// static late final int? extensionStaticLateFinalFieldAndDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:146:12: Error: 'extensionStaticFieldAndInstanceDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:142:12: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndInstanceSetter'. +// void set extensionStaticFieldAndInstanceSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:141:15: Context: Field 'extensionStaticFieldAndInstanceSetter' with the implicit setter. +// static int? extensionStaticFieldAndInstanceSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:145:12: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndInstanceDuplicateSetter'. // void set extensionStaticFieldAndInstanceDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:145:12: Context: Previous declaration of 'extensionStaticFieldAndInstanceDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:144:15: Context: Field 'extensionStaticFieldAndInstanceDuplicateSetter' with the implicit setter. +// static int? extensionStaticFieldAndInstanceDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:146:12: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndInstanceDuplicateSetter'. // void set extensionStaticFieldAndInstanceDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:144:15: Context: Field 'extensionStaticFieldAndInstanceDuplicateSetter' with the implicit setter. +// static int? extensionStaticFieldAndInstanceDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:153:19: Error: 'extensionInstanceFieldAndStaticDuplicateSetter' is already declared in this scope. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:149:19: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndStaticSetter'. +// static void set extensionInstanceFieldAndStaticSetter(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:148:8: Context: Field 'extensionInstanceFieldAndStaticSetter' with the implicit setter. +// int? extensionInstanceFieldAndStaticSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:152:19: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndStaticDuplicateSetter'. // static void set extensionInstanceFieldAndStaticDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:152:19: Context: Previous declaration of 'extensionInstanceFieldAndStaticDuplicateSetter'. +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:151:8: Context: Field 'extensionInstanceFieldAndStaticDuplicateSetter' with the implicit setter. +// int? extensionInstanceFieldAndStaticDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:153:19: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndStaticDuplicateSetter'. // static void set extensionInstanceFieldAndStaticDuplicateSetter(int? value) {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:151:8: Context: Field 'extensionInstanceFieldAndStaticDuplicateSetter' with the implicit setter. +// int? extensionInstanceFieldAndStaticDuplicateSetter; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:156:14: Error: 'duplicateExtensionInstanceFieldAndStaticSetter1' is already declared in this scope. // final int? duplicateExtensionInstanceFieldAndStaticSetter1 = null; @@ -258,6 +517,13 @@ library; // int? duplicateExtensionInstanceFieldAndStaticSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:157:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndStaticSetter1'. +// static void set duplicateExtensionInstanceFieldAndStaticSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:155:8: Context: Field 'duplicateExtensionInstanceFieldAndStaticSetter1' with the implicit setter. +// int? duplicateExtensionInstanceFieldAndStaticSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:160:8: Error: 'duplicateExtensionInstanceFieldAndStaticSetter2' is already declared in this scope. // int? duplicateExtensionInstanceFieldAndStaticSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -265,6 +531,20 @@ library; // final int? duplicateExtensionInstanceFieldAndStaticSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:161:19: Error: Static property 'duplicateExtensionInstanceFieldAndStaticSetter2' conflicts with instance property of the same name. +// static void set duplicateExtensionInstanceFieldAndStaticSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:159:14: Context: Conflicting instance property 'duplicateExtensionInstanceFieldAndStaticSetter2'. +// final int? duplicateExtensionInstanceFieldAndStaticSetter2 = null; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:161:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndStaticSetter2'. +// static void set duplicateExtensionInstanceFieldAndStaticSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:160:8: Context: Field 'duplicateExtensionInstanceFieldAndStaticSetter2' with the implicit setter. +// int? duplicateExtensionInstanceFieldAndStaticSetter2; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:164:21: Error: 'duplicateExtensionStaticFieldAndInstanceSetter1' is already declared in this scope. // static final int? duplicateExtensionStaticFieldAndInstanceSetter1 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -272,6 +552,13 @@ library; // static int? duplicateExtensionStaticFieldAndInstanceSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:165:12: Error: Conflicts with the implicit setter of the field 'duplicateExtensionStaticFieldAndInstanceSetter1'. +// void set duplicateExtensionStaticFieldAndInstanceSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:163:15: Context: Field 'duplicateExtensionStaticFieldAndInstanceSetter1' with the implicit setter. +// static int? duplicateExtensionStaticFieldAndInstanceSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:168:15: Error: 'duplicateExtensionStaticFieldAndInstanceSetter2' is already declared in this scope. // static int? duplicateExtensionStaticFieldAndInstanceSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -279,425 +566,19 @@ library; // static final int? duplicateExtensionStaticFieldAndInstanceSetter2 = null; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:6:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndSetter'. -// void set topLevelFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:5:6: Error: Conflicts with setter 'topLevelFieldAndSetter'. -// int? topLevelFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:10:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndDuplicateSetter'. -// void set topLevelFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:9:10: Error: Conflicts with the implicit setter of the field 'topLevelFieldAndDuplicateSetter'. -// void set topLevelFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:8:6: Error: Conflicts with setter 'topLevelFieldAndDuplicateSetter'. -// int? topLevelFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:14:10: Error: Conflicts with the implicit setter of the field 'duplicateTopLevelFieldAndSetter1'. -// void set duplicateTopLevelFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:12:6: Error: Conflicts with setter 'duplicateTopLevelFieldAndSetter1'. -// int? duplicateTopLevelFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:18:10: Error: Conflicts with the implicit setter of the field 'duplicateTopLevelFieldAndSetter2'. -// void set duplicateTopLevelFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:17:6: Error: Conflicts with setter 'duplicateTopLevelFieldAndSetter2'. -// int? duplicateTopLevelFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:21:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndSetter'. -// void set topLevelLateFinalFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:20:17: Error: Conflicts with setter 'topLevelLateFinalFieldAndSetter'. -// late final int? topLevelLateFinalFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:25:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndDuplicateSetter'. -// void set topLevelLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:24:10: Error: Conflicts with the implicit setter of the field 'topLevelLateFinalFieldAndDuplicateSetter'. -// void set topLevelLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:23:17: Error: Conflicts with setter 'topLevelLateFinalFieldAndDuplicateSetter'. -// late final int? topLevelLateFinalFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:29:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndSetter'. -// void set instanceFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:28:8: Error: Conflicts with setter 'instanceFieldAndSetter'. -// int? instanceFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:33:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndDuplicateSetter'. -// void set instanceFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:32:12: Error: Conflicts with the implicit setter of the field 'instanceFieldAndDuplicateSetter'. -// void set instanceFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:31:8: Error: Conflicts with setter 'instanceFieldAndDuplicateSetter'. -// int? instanceFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:37:12: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndSetter1'. -// void set duplicateInstanceFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:35:8: Error: Conflicts with setter 'duplicateInstanceFieldAndSetter1'. -// int? duplicateInstanceFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:41:12: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndSetter2'. -// void set duplicateInstanceFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:40:8: Error: Conflicts with setter 'duplicateInstanceFieldAndSetter2'. -// int? duplicateInstanceFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:44:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndSetter'. -// void set instanceLateFinalFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:43:19: Error: Conflicts with setter 'instanceLateFinalFieldAndSetter'. -// late final int? instanceLateFinalFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:48:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndDuplicateSetter'. -// void set instanceLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:47:12: Error: Conflicts with the implicit setter of the field 'instanceLateFinalFieldAndDuplicateSetter'. -// void set instanceLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:46:19: Error: Conflicts with setter 'instanceLateFinalFieldAndDuplicateSetter'. -// late final int? instanceLateFinalFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:51:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndSetter'. -// static void set staticFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:50:15: Error: Conflicts with setter 'staticFieldAndSetter'. -// static int? staticFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:55:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndDuplicateSetter'. -// static void set staticFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:54:19: Error: Conflicts with the implicit setter of the field 'staticFieldAndDuplicateSetter'. -// static void set staticFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:53:15: Error: Conflicts with setter 'staticFieldAndDuplicateSetter'. -// static int? staticFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:59:19: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndSetter1'. -// static void set duplicateStaticFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:57:15: Error: Conflicts with setter 'duplicateStaticFieldAndSetter1'. -// static int? duplicateStaticFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:63:19: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndSetter2'. -// static void set duplicateStaticFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:62:15: Error: Conflicts with setter 'duplicateStaticFieldAndSetter2'. -// static int? duplicateStaticFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:66:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndSetter'. -// static void set staticLateFinalFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:65:26: Error: Conflicts with setter 'staticLateFinalFieldAndSetter'. -// static late final int? staticLateFinalFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:70:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndDuplicateSetter'. -// static void set staticLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:69:19: Error: Conflicts with the implicit setter of the field 'staticLateFinalFieldAndDuplicateSetter'. -// static void set staticLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:68:26: Error: Conflicts with setter 'staticLateFinalFieldAndDuplicateSetter'. -// static late final int? staticLateFinalFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:73:12: Error: Conflicts with the implicit setter of the field 'staticFieldAndInstanceSetter'. -// void set staticFieldAndInstanceSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:72:15: Error: Conflicts with setter 'staticFieldAndInstanceSetter'. -// static int? staticFieldAndInstanceSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:77:12: Error: Conflicts with the implicit setter of the field 'staticFieldAndInstanceDuplicateSetter'. -// void set staticFieldAndInstanceDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:76:12: Error: Conflicts with the implicit setter of the field 'staticFieldAndInstanceDuplicateSetter'. -// void set staticFieldAndInstanceDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:75:15: Error: Conflicts with setter 'staticFieldAndInstanceDuplicateSetter'. -// static int? staticFieldAndInstanceDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:80:19: Error: Conflicts with the implicit setter of the field 'instanceFieldAndStaticSetter'. -// static void set instanceFieldAndStaticSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:79:8: Error: Conflicts with setter 'instanceFieldAndStaticSetter'. -// int? instanceFieldAndStaticSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:84:19: Error: Conflicts with the implicit setter of the field 'instanceFieldAndStaticDuplicateSetter'. -// static void set instanceFieldAndStaticDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:83:19: Error: Conflicts with the implicit setter of the field 'instanceFieldAndStaticDuplicateSetter'. -// static void set instanceFieldAndStaticDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:82:8: Error: Conflicts with setter 'instanceFieldAndStaticDuplicateSetter'. -// int? instanceFieldAndStaticDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:88:19: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndStaticSetter1'. -// static void set duplicateInstanceFieldAndStaticSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:86:8: Error: Conflicts with setter 'duplicateInstanceFieldAndStaticSetter1'. -// int? duplicateInstanceFieldAndStaticSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:92:19: Error: Conflicts with the implicit setter of the field 'duplicateInstanceFieldAndStaticSetter2'. -// static void set duplicateInstanceFieldAndStaticSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:91:8: Error: Conflicts with setter 'duplicateInstanceFieldAndStaticSetter2'. -// int? duplicateInstanceFieldAndStaticSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:96:12: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndInstanceSetter1'. -// void set duplicateStaticFieldAndInstanceSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:94:15: Error: Conflicts with setter 'duplicateStaticFieldAndInstanceSetter1'. -// static int? duplicateStaticFieldAndInstanceSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:100:12: Error: Conflicts with the implicit setter of the field 'duplicateStaticFieldAndInstanceSetter2'. -// void set duplicateStaticFieldAndInstanceSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:99:15: Error: Conflicts with setter 'duplicateStaticFieldAndInstanceSetter2'. -// static int? duplicateStaticFieldAndInstanceSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:105:12: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndSetter'. -// void set extensionInstanceFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:104:8: Error: Conflicts with setter 'extensionInstanceFieldAndSetter'. -// int? extensionInstanceFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:109:12: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndDuplicateSetter'. -// void set extensionInstanceFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:108:12: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndDuplicateSetter'. -// void set extensionInstanceFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:107:8: Error: Conflicts with setter 'extensionInstanceFieldAndDuplicateSetter'. -// int? extensionInstanceFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:113:12: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndSetter1'. -// void set duplicateExtensionInstanceFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:111:8: Error: Conflicts with setter 'duplicateExtensionInstanceFieldAndSetter1'. -// int? duplicateExtensionInstanceFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:117:12: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndSetter2'. -// void set duplicateExtensionInstanceFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:116:8: Error: Conflicts with setter 'duplicateExtensionInstanceFieldAndSetter2'. -// int? duplicateExtensionInstanceFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:120:19: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndSetter'. -// static void set extensionStaticFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:119:15: Error: Conflicts with setter 'extensionStaticFieldAndSetter'. -// static int? extensionStaticFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:124:19: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndDuplicateSetter'. -// static void set extensionStaticFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:123:19: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndDuplicateSetter'. -// static void set extensionStaticFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:122:15: Error: Conflicts with setter 'extensionStaticFieldAndDuplicateSetter'. -// static int? extensionStaticFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:128:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionStaticFieldAndSetter1'. -// static void set duplicateExtensionStaticFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:126:15: Error: Conflicts with setter 'duplicateExtensionStaticFieldAndSetter1'. -// static int? duplicateExtensionStaticFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:132:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionStaticFieldAndSetter2'. -// static void set duplicateExtensionStaticFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:131:15: Error: Conflicts with setter 'duplicateExtensionStaticFieldAndSetter2'. -// static int? duplicateExtensionStaticFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:135:19: Error: Conflicts with the implicit setter of the field 'extensionStaticLateFinalFieldAndSetter'. -// static void set extensionStaticLateFinalFieldAndSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:134:26: Error: Conflicts with setter 'extensionStaticLateFinalFieldAndSetter'. -// static late final int? extensionStaticLateFinalFieldAndSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:139:19: Error: Conflicts with the implicit setter of the field 'extensionStaticLateFinalFieldAndDuplicateSetter'. -// static void set extensionStaticLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:138:19: Error: Conflicts with the implicit setter of the field 'extensionStaticLateFinalFieldAndDuplicateSetter'. -// static void set extensionStaticLateFinalFieldAndDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:137:26: Error: Conflicts with setter 'extensionStaticLateFinalFieldAndDuplicateSetter'. -// static late final int? extensionStaticLateFinalFieldAndDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:142:12: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndInstanceSetter'. -// void set extensionStaticFieldAndInstanceSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:141:15: Error: Conflicts with setter 'extensionStaticFieldAndInstanceSetter'. -// static int? extensionStaticFieldAndInstanceSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:146:12: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndInstanceDuplicateSetter'. -// void set extensionStaticFieldAndInstanceDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:145:12: Error: Conflicts with the implicit setter of the field 'extensionStaticFieldAndInstanceDuplicateSetter'. -// void set extensionStaticFieldAndInstanceDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:144:15: Error: Conflicts with setter 'extensionStaticFieldAndInstanceDuplicateSetter'. -// static int? extensionStaticFieldAndInstanceDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:149:19: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndStaticSetter'. -// static void set extensionInstanceFieldAndStaticSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:148:8: Error: Conflicts with setter 'extensionInstanceFieldAndStaticSetter'. -// int? extensionInstanceFieldAndStaticSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:153:19: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndStaticDuplicateSetter'. -// static void set extensionInstanceFieldAndStaticDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:152:19: Error: Conflicts with the implicit setter of the field 'extensionInstanceFieldAndStaticDuplicateSetter'. -// static void set extensionInstanceFieldAndStaticDuplicateSetter(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:151:8: Error: Conflicts with setter 'extensionInstanceFieldAndStaticDuplicateSetter'. -// int? extensionInstanceFieldAndStaticDuplicateSetter; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:157:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndStaticSetter1'. -// static void set duplicateExtensionInstanceFieldAndStaticSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:155:8: Error: Conflicts with setter 'duplicateExtensionInstanceFieldAndStaticSetter1'. -// int? duplicateExtensionInstanceFieldAndStaticSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:156:14: Error: Conflicts with setter 'duplicateExtensionInstanceFieldAndStaticSetter1'. -// final int? duplicateExtensionInstanceFieldAndStaticSetter1 = null; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:161:19: Error: Conflicts with the implicit setter of the field 'duplicateExtensionInstanceFieldAndStaticSetter2'. -// static void set duplicateExtensionInstanceFieldAndStaticSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:160:8: Error: Conflicts with setter 'duplicateExtensionInstanceFieldAndStaticSetter2'. -// int? duplicateExtensionInstanceFieldAndStaticSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:159:14: Error: Conflicts with setter 'duplicateExtensionInstanceFieldAndStaticSetter2'. -// final int? duplicateExtensionInstanceFieldAndStaticSetter2 = null; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:165:12: Error: Conflicts with the implicit setter of the field 'duplicateExtensionStaticFieldAndInstanceSetter1'. -// void set duplicateExtensionStaticFieldAndInstanceSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:163:15: Error: Conflicts with setter 'duplicateExtensionStaticFieldAndInstanceSetter1'. -// static int? duplicateExtensionStaticFieldAndInstanceSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:164:21: Error: Conflicts with setter 'duplicateExtensionStaticFieldAndInstanceSetter1'. -// static final int? duplicateExtensionStaticFieldAndInstanceSetter1 = null; -// ^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:169:12: Error: Instance property 'duplicateExtensionStaticFieldAndInstanceSetter2' conflicts with static property of the same name. +// void set duplicateExtensionStaticFieldAndInstanceSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:167:21: Context: Conflicting static property 'duplicateExtensionStaticFieldAndInstanceSetter2'. +// static final int? duplicateExtensionStaticFieldAndInstanceSetter2 = null; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:169:12: Error: Conflicts with the implicit setter of the field 'duplicateExtensionStaticFieldAndInstanceSetter2'. // void set duplicateExtensionStaticFieldAndInstanceSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:168:15: Error: Conflicts with setter 'duplicateExtensionStaticFieldAndInstanceSetter2'. +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/field_vs_setter.dart:168:15: Context: Field 'duplicateExtensionStaticFieldAndInstanceSetter2' with the implicit setter. // static int? duplicateExtensionStaticFieldAndInstanceSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:167:21: Error: Conflicts with setter 'duplicateExtensionStaticFieldAndInstanceSetter2'. -// static final int? duplicateExtensionStaticFieldAndInstanceSetter2 = null; -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/field_vs_setter.dart:178:38: Error: Can't use 'duplicateTopLevelFieldAndSetter1' because it is declared more than once. // duplicateTopLevelFieldAndSetter1 = duplicateTopLevelFieldAndSetter1; @@ -948,11 +829,6 @@ library; // 0.duplicateExtensionInstanceFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/field_vs_setter.dart:238:5: Error: The setter 'duplicateExtensionInstanceFieldAndSetter2' isn't defined for the class 'int'. -// Try correcting the name to the name of an existing setter, or defining a setter or field named 'duplicateExtensionInstanceFieldAndSetter2'. -// 0.duplicateExtensionInstanceFieldAndSetter2 = -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// // pkg/front_end/testcases/nnbd/field_vs_setter.dart:257:5: Error: The setter 'extensionStaticFieldAndInstanceSetter' isn't defined for the class 'int'. // Try correcting the name to the name of an existing setter, or defining a setter or field named 'extensionStaticFieldAndInstanceSetter'. // 0.extensionStaticFieldAndInstanceSetter = @@ -1040,6 +916,8 @@ class Class extends core::Object { synthetic constructor •() → self::Class : super core::Object::•() ; + set duplicateInstanceFieldAndSetter2(core::int? value) → void {} + static set duplicateStaticFieldAndSetter2(core::int? value) → void {} } extension Extension on core::int? { field extensionInstanceFieldAndSetter = self::Extension|extensionInstanceFieldAndSetter; @@ -1060,6 +938,8 @@ extension Extension on core::int? { field duplicateExtensionInstanceFieldAndStaticSetter2 = self::Extension|duplicateExtensionInstanceFieldAndStaticSetter2; static field duplicateExtensionStaticFieldAndInstanceSetter1 = self::Extension|duplicateExtensionStaticFieldAndInstanceSetter1; static field duplicateExtensionStaticFieldAndInstanceSetter2 = self::Extension|duplicateExtensionStaticFieldAndInstanceSetter2; + set duplicateExtensionInstanceFieldAndSetter2 = self::Extension|set#duplicateExtensionInstanceFieldAndSetter2; + static set duplicateExtensionStaticFieldAndSetter2 = set self::Extension|duplicateExtensionStaticFieldAndSetter2; } static field core::int? topLevelFieldAndSetter; static field core::int? topLevelFieldAndDuplicateSetter; @@ -1085,6 +965,9 @@ static field core::int? Extension|duplicateExtensionInstanceFieldAndStaticSetter static final field core::int? Extension|duplicateExtensionInstanceFieldAndStaticSetter2 = null; static field core::int? Extension|duplicateExtensionStaticFieldAndInstanceSetter1; static final field core::int? Extension|duplicateExtensionStaticFieldAndInstanceSetter2 = null; +static set duplicateTopLevelFieldAndSetter2(core::int? value) → void {} +static extension-member method Extension|set#duplicateExtensionInstanceFieldAndSetter2(lowered final core::int? #this, core::int? value) → void {} +static extension-member set Extension|duplicateExtensionStaticFieldAndSetter2(core::int? value) → void {} static method test() → dynamic { self::topLevelFieldAndSetter = self::topLevelFieldAndSetter; self::topLevelFieldAndDuplicateSetter = self::topLevelFieldAndDuplicateSetter; @@ -1184,13 +1067,10 @@ Try correcting the name to the name of an existing setter, or defining a setter Try correcting the name to the name of an existing getter, or defining a getter or field named 'duplicateExtensionInstanceFieldAndSetter1'. 0.duplicateExtensionInstanceFieldAndSetter1; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" in 0{}.duplicateExtensionInstanceFieldAndSetter1; - invalid-expression "pkg/front_end/testcases/nnbd/field_vs_setter.dart:238:5: Error: The setter 'duplicateExtensionInstanceFieldAndSetter2' isn't defined for the class 'int'. -Try correcting the name to the name of an existing setter, or defining a setter or field named 'duplicateExtensionInstanceFieldAndSetter2'. - 0.duplicateExtensionInstanceFieldAndSetter2 = - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" in 0.{}duplicateExtensionInstanceFieldAndSetter2 = invalid-expression "pkg/front_end/testcases/nnbd/field_vs_setter.dart:239:9: Error: The getter 'duplicateExtensionInstanceFieldAndSetter2' isn't defined for the class 'int'. + self::Extension|set#duplicateExtensionInstanceFieldAndSetter2(0, invalid-expression "pkg/front_end/testcases/nnbd/field_vs_setter.dart:239:9: Error: The getter 'duplicateExtensionInstanceFieldAndSetter2' isn't defined for the class 'int'. Try correcting the name to the name of an existing getter, or defining a getter or field named 'duplicateExtensionInstanceFieldAndSetter2'. 0.duplicateExtensionInstanceFieldAndSetter2; - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" in 0{}.duplicateExtensionInstanceFieldAndSetter2; + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" in 0{}.duplicateExtensionInstanceFieldAndSetter2 as{TypeError,ForDynamic,Unchecked} core::int?); self::Extension|extensionStaticFieldAndSetter = self::Extension|extensionStaticFieldAndSetter; self::Extension|extensionStaticFieldAndDuplicateSetter = self::Extension|extensionStaticFieldAndDuplicateSetter; self::Extension|extensionStaticLateFinalFieldAndSetter = self::Extension|extensionStaticLateFinalFieldAndSetter; diff --git a/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.expect b/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.expect index c12d5e6c519e..efd26c7bef14 100644 --- a/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.expect @@ -42,6 +42,20 @@ library; // int? methodAndFieldAndSetter1() {} // ^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:20:12: Error: The setter conflicts with declaration 'methodAndFieldAndSetter1'. +// void set methodAndFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:18:8: Context: Conflicting declaration 'methodAndFieldAndSetter1'. +// int? methodAndFieldAndSetter1() {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:20:12: Error: Conflicts with the implicit setter of the field 'methodAndFieldAndSetter1'. +// void set methodAndFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:19:8: Context: Field 'methodAndFieldAndSetter1' with the implicit setter. +// int? methodAndFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:23:8: Error: 'methodAndFieldAndSetter2' is already declared in this scope. // int? methodAndFieldAndSetter2() {} // ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -49,12 +63,33 @@ library; // int? methodAndFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:28:8: Error: 'methodAndFieldAndSetter3' is already declared in this scope. -// int? methodAndFieldAndSetter3; +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:24:12: Error: Conflicts with the implicit setter of the field 'methodAndFieldAndSetter2'. +// void set methodAndFieldAndSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:22:8: Context: Field 'methodAndFieldAndSetter2' with the implicit setter. +// int? methodAndFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:27:8: Context: Previous declaration of 'methodAndFieldAndSetter3'. +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:27:8: Error: The declaration conflicts with setter 'methodAndFieldAndSetter3'. // int? methodAndFieldAndSetter3() {} // ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:26:12: Context: Conflicting setter 'methodAndFieldAndSetter3'. +// void set methodAndFieldAndSetter3(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:28:8: Error: Conflicts with setter 'methodAndFieldAndSetter3'. +// int? methodAndFieldAndSetter3; +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:26:12: Context: Conflicting setter 'methodAndFieldAndSetter3'. +// void set methodAndFieldAndSetter3(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:31:8: Error: Conflicts with setter 'methodAndFieldAndSetter4'. +// int? methodAndFieldAndSetter4; +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:30:12: Context: Conflicting setter 'methodAndFieldAndSetter4'. +// void set methodAndFieldAndSetter4(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/instance_duplicates.dart:32:8: Error: 'methodAndFieldAndSetter4' is already declared in this scope. // int? methodAndFieldAndSetter4() {} @@ -70,6 +105,13 @@ library; // int? methodAndFinalFieldAndSetter1() {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:36:12: Error: The setter conflicts with declaration 'methodAndFinalFieldAndSetter1'. +// void set methodAndFinalFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:34:8: Context: Conflicting declaration 'methodAndFinalFieldAndSetter1'. +// int? methodAndFinalFieldAndSetter1() {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:39:8: Error: 'methodAndFinalFieldAndSetter2' is already declared in this scope. // int? methodAndFinalFieldAndSetter2() {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -77,12 +119,12 @@ library; // final int? methodAndFinalFieldAndSetter2 = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:44:14: Error: 'methodAndFinalFieldAndSetter3' is already declared in this scope. -// final int? methodAndFinalFieldAndSetter3 = 0; -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:43:8: Context: Previous declaration of 'methodAndFinalFieldAndSetter3'. +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:43:8: Error: The declaration conflicts with setter 'methodAndFinalFieldAndSetter3'. // int? methodAndFinalFieldAndSetter3() {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:42:12: Context: Conflicting setter 'methodAndFinalFieldAndSetter3'. +// void set methodAndFinalFieldAndSetter3(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/instance_duplicates.dart:48:8: Error: 'methodAndFinalFieldAndSetter4' is already declared in this scope. // int? methodAndFinalFieldAndSetter4() {} @@ -91,6 +133,34 @@ library; // final int? methodAndFinalFieldAndSetter4 = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:51:12: Error: The setter conflicts with declaration 'methodAndSetter1'. +// void set methodAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:50:8: Context: Conflicting declaration 'methodAndSetter1'. +// int? methodAndSetter1() {} +// ^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:54:12: Error: The setter conflicts with declaration 'methodAndSetter2'. +// int? set methodAndSetter2() {} +// ^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:53:8: Context: Conflicting declaration 'methodAndSetter2'. +// void methodAndSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:57:12: Error: Conflicts with the implicit setter of the field 'fieldAndSetter1'. +// void set fieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:56:8: Context: Field 'fieldAndSetter1' with the implicit setter. +// int? fieldAndSetter1; +// ^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:60:12: Error: Conflicts with the implicit setter of the field 'fieldAndSetter2'. +// void set fieldAndSetter2(int? value) {} +// ^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:59:8: Context: Field 'fieldAndSetter2' with the implicit setter. +// int? fieldAndSetter2; +// ^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:63:14: Error: 'fieldAndFinalFieldAndSetter1' is already declared in this scope. // final int? fieldAndFinalFieldAndSetter1 = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -98,6 +168,13 @@ library; // int? fieldAndFinalFieldAndSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:64:12: Error: Conflicts with the implicit setter of the field 'fieldAndFinalFieldAndSetter1'. +// void set fieldAndFinalFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:62:8: Context: Field 'fieldAndFinalFieldAndSetter1' with the implicit setter. +// int? fieldAndFinalFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:67:8: Error: 'fieldAndFinalFieldAndSetter2' is already declared in this scope. // int? fieldAndFinalFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -105,6 +182,13 @@ library; // final int? fieldAndFinalFieldAndSetter2 = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:71:8: Error: Conflicts with setter 'fieldAndFinalFieldAndSetter3'. +// int? fieldAndFinalFieldAndSetter3; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:70:12: Context: Conflicting setter 'fieldAndFinalFieldAndSetter3'. +// void set fieldAndFinalFieldAndSetter3(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:72:14: Error: 'fieldAndFinalFieldAndSetter3' is already declared in this scope. // final int? fieldAndFinalFieldAndSetter3 = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -119,114 +203,6 @@ library; // final int? fieldAndFinalFieldAndSetter4 = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:20:12: Error: Conflicts with the implicit setter of the field 'methodAndFieldAndSetter1'. -// void set methodAndFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:19:8: Error: Conflicts with setter 'methodAndFieldAndSetter1'. -// int? methodAndFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:24:12: Error: Conflicts with the implicit setter of the field 'methodAndFieldAndSetter2'. -// void set methodAndFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:22:8: Error: Conflicts with setter 'methodAndFieldAndSetter2'. -// int? methodAndFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:26:12: Error: Conflicts with the implicit setter of the field 'methodAndFieldAndSetter3'. -// void set methodAndFieldAndSetter3(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:28:8: Error: Conflicts with setter 'methodAndFieldAndSetter3'. -// int? methodAndFieldAndSetter3; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:30:12: Error: Conflicts with the implicit setter of the field 'methodAndFieldAndSetter4'. -// void set methodAndFieldAndSetter4(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:31:8: Error: Conflicts with setter 'methodAndFieldAndSetter4'. -// int? methodAndFieldAndSetter4; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:57:12: Error: Conflicts with the implicit setter of the field 'fieldAndSetter1'. -// void set fieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:56:8: Error: Conflicts with setter 'fieldAndSetter1'. -// int? fieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:60:12: Error: Conflicts with the implicit setter of the field 'fieldAndSetter2'. -// void set fieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:59:8: Error: Conflicts with setter 'fieldAndSetter2'. -// int? fieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:64:12: Error: Conflicts with the implicit setter of the field 'fieldAndFinalFieldAndSetter1'. -// void set fieldAndFinalFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:62:8: Error: Conflicts with setter 'fieldAndFinalFieldAndSetter1'. -// int? fieldAndFinalFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:68:12: Error: Conflicts with the implicit setter of the field 'fieldAndFinalFieldAndSetter2'. -// void set fieldAndFinalFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:67:8: Error: Conflicts with setter 'fieldAndFinalFieldAndSetter2'. -// int? fieldAndFinalFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:70:12: Error: Conflicts with the implicit setter of the field 'fieldAndFinalFieldAndSetter3'. -// void set fieldAndFinalFieldAndSetter3(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:71:8: Error: Conflicts with setter 'fieldAndFinalFieldAndSetter3'. -// int? fieldAndFinalFieldAndSetter3; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:74:12: Error: Conflicts with the implicit setter of the field 'fieldAndFinalFieldAndSetter4'. -// void set fieldAndFinalFieldAndSetter4(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:76:8: Error: Conflicts with setter 'fieldAndFinalFieldAndSetter4'. -// int? fieldAndFinalFieldAndSetter4; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:36:12: Error: 'methodAndFinalFieldAndSetter1' is already declared in this scope. -// void set methodAndFinalFieldAndSetter1(int? value) {} -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:34:8: Context: Previous declaration of 'methodAndFinalFieldAndSetter1'. -// int? methodAndFinalFieldAndSetter1() {} -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:43:8: Error: 'methodAndFinalFieldAndSetter3' is already declared in this scope. -// int? methodAndFinalFieldAndSetter3() {} -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:42:12: Context: Previous declaration of 'methodAndFinalFieldAndSetter3'. -// void set methodAndFinalFieldAndSetter3(int? value) {} -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:51:12: Error: 'methodAndSetter1' is already declared in this scope. -// void set methodAndSetter1(int? value) {} -// ^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:50:8: Context: Previous declaration of 'methodAndSetter1'. -// int? methodAndSetter1() {} -// ^^^^^^^^^^^^^^^^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:54:12: Error: 'methodAndSetter2' is already declared in this scope. -// int? set methodAndSetter2() {} -// ^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:53:8: Context: Previous declaration of 'methodAndSetter2'. -// void methodAndSetter2(int? value) {} -// ^^^^^^^^^^^^^^^^ -// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:54:28: Error: A setter should have exactly one formal parameter. // int? set methodAndSetter2() {} // ^ @@ -243,36 +219,14 @@ library; // c.methodAndFieldAndSetter1 = c.methodAndFieldAndSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:86:5: Error: The setter 'methodAndFieldAndSetter3' isn't defined for the class 'Class'. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/instance_duplicates.dart'. -// Try correcting the name to the name of an existing setter, or defining a setter or field named 'methodAndFieldAndSetter3'. -// c.methodAndFieldAndSetter3 = c.methodAndFieldAndSetter3; -// ^^^^^^^^^^^^^^^^^^^^^^^^ -// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:88:39: Error: A value of type 'int? Function()' can't be assigned to a variable of type 'int?'. // c.methodAndFinalFieldAndSetter1 = c.methodAndFinalFieldAndSetter1; // ^ // -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:90:39: Error: A value of type 'int? Function()' can't be assigned to a variable of type 'int?'. -// c.methodAndFinalFieldAndSetter3 = c.methodAndFinalFieldAndSetter3; -// ^ -// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:92:26: Error: A value of type 'int? Function()' can't be assigned to a variable of type 'int?'. // c.methodAndSetter1 = c.methodAndSetter1; // ^ // -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:97:5: Error: The setter 'fieldAndFinalFieldAndSetter2' isn't defined for the class 'Class'. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/instance_duplicates.dart'. -// Try correcting the name to the name of an existing setter, or defining a setter or field named 'fieldAndFinalFieldAndSetter2'. -// c.fieldAndFinalFieldAndSetter2 = c.fieldAndFinalFieldAndSetter2; -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:99:5: Error: The setter 'fieldAndFinalFieldAndSetter4' isn't defined for the class 'Class'. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/instance_duplicates.dart'. -// Try correcting the name to the name of an existing setter, or defining a setter or field named 'fieldAndFinalFieldAndSetter4'. -// c.fieldAndFinalFieldAndSetter4 = c.fieldAndFinalFieldAndSetter4; -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// import self as self; import "dart:core" as core; @@ -280,8 +234,10 @@ class Class extends core::Object { field core::int? methodAndField2 = null; final field core::int? methodAndFinalField2 = 0; field core::int? methodAndFieldAndSetter2 = null; + field core::int? methodAndFieldAndSetter3 = null; field core::int? methodAndFieldAndSetter4 = null; final field core::int? methodAndFinalFieldAndSetter2 = 0; + final field core::int? methodAndFinalFieldAndSetter3 = 0; final field core::int? methodAndFinalFieldAndSetter4 = 0; field core::int? fieldAndSetter1 = null; field core::int? fieldAndSetter2 = null; @@ -295,12 +251,10 @@ class Class extends core::Object { method methodAndField1() → core::int? {} method methodAndFinalField1() → core::int? {} method methodAndFieldAndSetter1() → core::int? {} - method methodAndFieldAndSetter3() → core::int? {} method methodAndFinalFieldAndSetter1() → core::int? {} set methodAndFinalFieldAndSetter1(core::int? value) → void {} set methodAndFinalFieldAndSetter2(core::int? value) → void {} set methodAndFinalFieldAndSetter3(core::int? value) → void {} - method methodAndFinalFieldAndSetter3() → core::int? {} set methodAndFinalFieldAndSetter4(core::int? value) → void {} method methodAndSetter1() → core::int? {} set methodAndSetter1(core::int? value) → void {} @@ -311,6 +265,8 @@ class Class extends core::Object { ^"; {} } + set fieldAndFinalFieldAndSetter2(core::int? value) → void {} + set fieldAndFinalFieldAndSetter4(core::int? value) → void {} } static method test(self::Class c) → dynamic { invalid-expression "pkg/front_end/testcases/nnbd/instance_duplicates.dart:80:5: Error: The setter 'methodAndField1' isn't defined for the class 'Class'. @@ -327,19 +283,13 @@ Try correcting the name to the name of an existing setter, or defining a setter c.methodAndFieldAndSetter1 = c.methodAndFieldAndSetter1; ^^^^^^^^^^^^^^^^^^^^^^^^" in c.{}methodAndFieldAndSetter1 = c.{self::Class::methodAndFieldAndSetter1}{() → core::int?}; c.{self::Class::methodAndFieldAndSetter2} = c.{self::Class::methodAndFieldAndSetter2}{core::int?}; - invalid-expression "pkg/front_end/testcases/nnbd/instance_duplicates.dart:86:5: Error: The setter 'methodAndFieldAndSetter3' isn't defined for the class 'Class'. - - 'Class' is from 'pkg/front_end/testcases/nnbd/instance_duplicates.dart'. -Try correcting the name to the name of an existing setter, or defining a setter or field named 'methodAndFieldAndSetter3'. - c.methodAndFieldAndSetter3 = c.methodAndFieldAndSetter3; - ^^^^^^^^^^^^^^^^^^^^^^^^" in c.{}methodAndFieldAndSetter3 = c.{self::Class::methodAndFieldAndSetter3}{() → core::int?}; + c.{self::Class::methodAndFieldAndSetter3} = c.{self::Class::methodAndFieldAndSetter3}{core::int?}; c.{self::Class::methodAndFieldAndSetter4} = c.{self::Class::methodAndFieldAndSetter4}{core::int?}; c.{self::Class::methodAndFinalFieldAndSetter1} = invalid-expression "pkg/front_end/testcases/nnbd/instance_duplicates.dart:88:39: Error: A value of type 'int? Function()' can't be assigned to a variable of type 'int?'. c.methodAndFinalFieldAndSetter1 = c.methodAndFinalFieldAndSetter1; ^" in c.{self::Class::methodAndFinalFieldAndSetter1}{() → core::int?} as{TypeError} core::int?; c.{self::Class::methodAndFinalFieldAndSetter2} = c.{self::Class::methodAndFinalFieldAndSetter2}{core::int?}; - c.{self::Class::methodAndFinalFieldAndSetter3} = invalid-expression "pkg/front_end/testcases/nnbd/instance_duplicates.dart:90:39: Error: A value of type 'int? Function()' can't be assigned to a variable of type 'int?'. - c.methodAndFinalFieldAndSetter3 = c.methodAndFinalFieldAndSetter3; - ^" in c.{self::Class::methodAndFinalFieldAndSetter3}{() → core::int?} as{TypeError} core::int?; + c.{self::Class::methodAndFinalFieldAndSetter3} = c.{self::Class::methodAndFinalFieldAndSetter3}{core::int?}; c.{self::Class::methodAndFinalFieldAndSetter4} = c.{self::Class::methodAndFinalFieldAndSetter4}{core::int?}; c.{self::Class::methodAndSetter1} = invalid-expression "pkg/front_end/testcases/nnbd/instance_duplicates.dart:92:26: Error: A value of type 'int? Function()' can't be assigned to a variable of type 'int?'. c.methodAndSetter1 = c.methodAndSetter1; @@ -348,16 +298,8 @@ Try correcting the name to the name of an existing setter, or defining a setter c.{self::Class::fieldAndSetter1} = c.{self::Class::fieldAndSetter1}{core::int?}; c.{self::Class::fieldAndSetter2} = c.{self::Class::fieldAndSetter2}{core::int?}; c.{self::Class::fieldAndFinalFieldAndSetter1} = c.{self::Class::fieldAndFinalFieldAndSetter1}{core::int?}; - invalid-expression "pkg/front_end/testcases/nnbd/instance_duplicates.dart:97:5: Error: The setter 'fieldAndFinalFieldAndSetter2' isn't defined for the class 'Class'. - - 'Class' is from 'pkg/front_end/testcases/nnbd/instance_duplicates.dart'. -Try correcting the name to the name of an existing setter, or defining a setter or field named 'fieldAndFinalFieldAndSetter2'. - c.fieldAndFinalFieldAndSetter2 = c.fieldAndFinalFieldAndSetter2; - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^" in c.{}fieldAndFinalFieldAndSetter2 = c.{self::Class::fieldAndFinalFieldAndSetter2}{core::int?}; + c.{self::Class::fieldAndFinalFieldAndSetter2} = c.{self::Class::fieldAndFinalFieldAndSetter2}{core::int?}; c.{self::Class::fieldAndFinalFieldAndSetter3} = c.{self::Class::fieldAndFinalFieldAndSetter3}{core::int?}; - invalid-expression "pkg/front_end/testcases/nnbd/instance_duplicates.dart:99:5: Error: The setter 'fieldAndFinalFieldAndSetter4' isn't defined for the class 'Class'. - - 'Class' is from 'pkg/front_end/testcases/nnbd/instance_duplicates.dart'. -Try correcting the name to the name of an existing setter, or defining a setter or field named 'fieldAndFinalFieldAndSetter4'. - c.fieldAndFinalFieldAndSetter4 = c.fieldAndFinalFieldAndSetter4; - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^" in c.{}fieldAndFinalFieldAndSetter4 = c.{self::Class::fieldAndFinalFieldAndSetter4}{core::int?}; + c.{self::Class::fieldAndFinalFieldAndSetter4} = c.{self::Class::fieldAndFinalFieldAndSetter4}{core::int?}; } static method main() → dynamic {} diff --git a/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.modular.expect b/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.modular.expect index c12d5e6c519e..efd26c7bef14 100644 --- a/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.modular.expect +++ b/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.modular.expect @@ -42,6 +42,20 @@ library; // int? methodAndFieldAndSetter1() {} // ^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:20:12: Error: The setter conflicts with declaration 'methodAndFieldAndSetter1'. +// void set methodAndFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:18:8: Context: Conflicting declaration 'methodAndFieldAndSetter1'. +// int? methodAndFieldAndSetter1() {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:20:12: Error: Conflicts with the implicit setter of the field 'methodAndFieldAndSetter1'. +// void set methodAndFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:19:8: Context: Field 'methodAndFieldAndSetter1' with the implicit setter. +// int? methodAndFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:23:8: Error: 'methodAndFieldAndSetter2' is already declared in this scope. // int? methodAndFieldAndSetter2() {} // ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -49,12 +63,33 @@ library; // int? methodAndFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:28:8: Error: 'methodAndFieldAndSetter3' is already declared in this scope. -// int? methodAndFieldAndSetter3; +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:24:12: Error: Conflicts with the implicit setter of the field 'methodAndFieldAndSetter2'. +// void set methodAndFieldAndSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:22:8: Context: Field 'methodAndFieldAndSetter2' with the implicit setter. +// int? methodAndFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:27:8: Context: Previous declaration of 'methodAndFieldAndSetter3'. +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:27:8: Error: The declaration conflicts with setter 'methodAndFieldAndSetter3'. // int? methodAndFieldAndSetter3() {} // ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:26:12: Context: Conflicting setter 'methodAndFieldAndSetter3'. +// void set methodAndFieldAndSetter3(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:28:8: Error: Conflicts with setter 'methodAndFieldAndSetter3'. +// int? methodAndFieldAndSetter3; +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:26:12: Context: Conflicting setter 'methodAndFieldAndSetter3'. +// void set methodAndFieldAndSetter3(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:31:8: Error: Conflicts with setter 'methodAndFieldAndSetter4'. +// int? methodAndFieldAndSetter4; +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:30:12: Context: Conflicting setter 'methodAndFieldAndSetter4'. +// void set methodAndFieldAndSetter4(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/instance_duplicates.dart:32:8: Error: 'methodAndFieldAndSetter4' is already declared in this scope. // int? methodAndFieldAndSetter4() {} @@ -70,6 +105,13 @@ library; // int? methodAndFinalFieldAndSetter1() {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:36:12: Error: The setter conflicts with declaration 'methodAndFinalFieldAndSetter1'. +// void set methodAndFinalFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:34:8: Context: Conflicting declaration 'methodAndFinalFieldAndSetter1'. +// int? methodAndFinalFieldAndSetter1() {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:39:8: Error: 'methodAndFinalFieldAndSetter2' is already declared in this scope. // int? methodAndFinalFieldAndSetter2() {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -77,12 +119,12 @@ library; // final int? methodAndFinalFieldAndSetter2 = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:44:14: Error: 'methodAndFinalFieldAndSetter3' is already declared in this scope. -// final int? methodAndFinalFieldAndSetter3 = 0; -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:43:8: Context: Previous declaration of 'methodAndFinalFieldAndSetter3'. +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:43:8: Error: The declaration conflicts with setter 'methodAndFinalFieldAndSetter3'. // int? methodAndFinalFieldAndSetter3() {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:42:12: Context: Conflicting setter 'methodAndFinalFieldAndSetter3'. +// void set methodAndFinalFieldAndSetter3(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/instance_duplicates.dart:48:8: Error: 'methodAndFinalFieldAndSetter4' is already declared in this scope. // int? methodAndFinalFieldAndSetter4() {} @@ -91,6 +133,34 @@ library; // final int? methodAndFinalFieldAndSetter4 = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:51:12: Error: The setter conflicts with declaration 'methodAndSetter1'. +// void set methodAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:50:8: Context: Conflicting declaration 'methodAndSetter1'. +// int? methodAndSetter1() {} +// ^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:54:12: Error: The setter conflicts with declaration 'methodAndSetter2'. +// int? set methodAndSetter2() {} +// ^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:53:8: Context: Conflicting declaration 'methodAndSetter2'. +// void methodAndSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:57:12: Error: Conflicts with the implicit setter of the field 'fieldAndSetter1'. +// void set fieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:56:8: Context: Field 'fieldAndSetter1' with the implicit setter. +// int? fieldAndSetter1; +// ^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:60:12: Error: Conflicts with the implicit setter of the field 'fieldAndSetter2'. +// void set fieldAndSetter2(int? value) {} +// ^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:59:8: Context: Field 'fieldAndSetter2' with the implicit setter. +// int? fieldAndSetter2; +// ^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:63:14: Error: 'fieldAndFinalFieldAndSetter1' is already declared in this scope. // final int? fieldAndFinalFieldAndSetter1 = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -98,6 +168,13 @@ library; // int? fieldAndFinalFieldAndSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:64:12: Error: Conflicts with the implicit setter of the field 'fieldAndFinalFieldAndSetter1'. +// void set fieldAndFinalFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:62:8: Context: Field 'fieldAndFinalFieldAndSetter1' with the implicit setter. +// int? fieldAndFinalFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:67:8: Error: 'fieldAndFinalFieldAndSetter2' is already declared in this scope. // int? fieldAndFinalFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -105,6 +182,13 @@ library; // final int? fieldAndFinalFieldAndSetter2 = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:71:8: Error: Conflicts with setter 'fieldAndFinalFieldAndSetter3'. +// int? fieldAndFinalFieldAndSetter3; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:70:12: Context: Conflicting setter 'fieldAndFinalFieldAndSetter3'. +// void set fieldAndFinalFieldAndSetter3(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:72:14: Error: 'fieldAndFinalFieldAndSetter3' is already declared in this scope. // final int? fieldAndFinalFieldAndSetter3 = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -119,114 +203,6 @@ library; // final int? fieldAndFinalFieldAndSetter4 = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:20:12: Error: Conflicts with the implicit setter of the field 'methodAndFieldAndSetter1'. -// void set methodAndFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:19:8: Error: Conflicts with setter 'methodAndFieldAndSetter1'. -// int? methodAndFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:24:12: Error: Conflicts with the implicit setter of the field 'methodAndFieldAndSetter2'. -// void set methodAndFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:22:8: Error: Conflicts with setter 'methodAndFieldAndSetter2'. -// int? methodAndFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:26:12: Error: Conflicts with the implicit setter of the field 'methodAndFieldAndSetter3'. -// void set methodAndFieldAndSetter3(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:28:8: Error: Conflicts with setter 'methodAndFieldAndSetter3'. -// int? methodAndFieldAndSetter3; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:30:12: Error: Conflicts with the implicit setter of the field 'methodAndFieldAndSetter4'. -// void set methodAndFieldAndSetter4(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:31:8: Error: Conflicts with setter 'methodAndFieldAndSetter4'. -// int? methodAndFieldAndSetter4; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:57:12: Error: Conflicts with the implicit setter of the field 'fieldAndSetter1'. -// void set fieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:56:8: Error: Conflicts with setter 'fieldAndSetter1'. -// int? fieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:60:12: Error: Conflicts with the implicit setter of the field 'fieldAndSetter2'. -// void set fieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:59:8: Error: Conflicts with setter 'fieldAndSetter2'. -// int? fieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:64:12: Error: Conflicts with the implicit setter of the field 'fieldAndFinalFieldAndSetter1'. -// void set fieldAndFinalFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:62:8: Error: Conflicts with setter 'fieldAndFinalFieldAndSetter1'. -// int? fieldAndFinalFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:68:12: Error: Conflicts with the implicit setter of the field 'fieldAndFinalFieldAndSetter2'. -// void set fieldAndFinalFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:67:8: Error: Conflicts with setter 'fieldAndFinalFieldAndSetter2'. -// int? fieldAndFinalFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:70:12: Error: Conflicts with the implicit setter of the field 'fieldAndFinalFieldAndSetter3'. -// void set fieldAndFinalFieldAndSetter3(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:71:8: Error: Conflicts with setter 'fieldAndFinalFieldAndSetter3'. -// int? fieldAndFinalFieldAndSetter3; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:74:12: Error: Conflicts with the implicit setter of the field 'fieldAndFinalFieldAndSetter4'. -// void set fieldAndFinalFieldAndSetter4(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:76:8: Error: Conflicts with setter 'fieldAndFinalFieldAndSetter4'. -// int? fieldAndFinalFieldAndSetter4; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:36:12: Error: 'methodAndFinalFieldAndSetter1' is already declared in this scope. -// void set methodAndFinalFieldAndSetter1(int? value) {} -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:34:8: Context: Previous declaration of 'methodAndFinalFieldAndSetter1'. -// int? methodAndFinalFieldAndSetter1() {} -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:43:8: Error: 'methodAndFinalFieldAndSetter3' is already declared in this scope. -// int? methodAndFinalFieldAndSetter3() {} -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:42:12: Context: Previous declaration of 'methodAndFinalFieldAndSetter3'. -// void set methodAndFinalFieldAndSetter3(int? value) {} -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:51:12: Error: 'methodAndSetter1' is already declared in this scope. -// void set methodAndSetter1(int? value) {} -// ^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:50:8: Context: Previous declaration of 'methodAndSetter1'. -// int? methodAndSetter1() {} -// ^^^^^^^^^^^^^^^^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:54:12: Error: 'methodAndSetter2' is already declared in this scope. -// int? set methodAndSetter2() {} -// ^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:53:8: Context: Previous declaration of 'methodAndSetter2'. -// void methodAndSetter2(int? value) {} -// ^^^^^^^^^^^^^^^^ -// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:54:28: Error: A setter should have exactly one formal parameter. // int? set methodAndSetter2() {} // ^ @@ -243,36 +219,14 @@ library; // c.methodAndFieldAndSetter1 = c.methodAndFieldAndSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:86:5: Error: The setter 'methodAndFieldAndSetter3' isn't defined for the class 'Class'. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/instance_duplicates.dart'. -// Try correcting the name to the name of an existing setter, or defining a setter or field named 'methodAndFieldAndSetter3'. -// c.methodAndFieldAndSetter3 = c.methodAndFieldAndSetter3; -// ^^^^^^^^^^^^^^^^^^^^^^^^ -// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:88:39: Error: A value of type 'int? Function()' can't be assigned to a variable of type 'int?'. // c.methodAndFinalFieldAndSetter1 = c.methodAndFinalFieldAndSetter1; // ^ // -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:90:39: Error: A value of type 'int? Function()' can't be assigned to a variable of type 'int?'. -// c.methodAndFinalFieldAndSetter3 = c.methodAndFinalFieldAndSetter3; -// ^ -// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:92:26: Error: A value of type 'int? Function()' can't be assigned to a variable of type 'int?'. // c.methodAndSetter1 = c.methodAndSetter1; // ^ // -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:97:5: Error: The setter 'fieldAndFinalFieldAndSetter2' isn't defined for the class 'Class'. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/instance_duplicates.dart'. -// Try correcting the name to the name of an existing setter, or defining a setter or field named 'fieldAndFinalFieldAndSetter2'. -// c.fieldAndFinalFieldAndSetter2 = c.fieldAndFinalFieldAndSetter2; -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:99:5: Error: The setter 'fieldAndFinalFieldAndSetter4' isn't defined for the class 'Class'. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/instance_duplicates.dart'. -// Try correcting the name to the name of an existing setter, or defining a setter or field named 'fieldAndFinalFieldAndSetter4'. -// c.fieldAndFinalFieldAndSetter4 = c.fieldAndFinalFieldAndSetter4; -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// import self as self; import "dart:core" as core; @@ -280,8 +234,10 @@ class Class extends core::Object { field core::int? methodAndField2 = null; final field core::int? methodAndFinalField2 = 0; field core::int? methodAndFieldAndSetter2 = null; + field core::int? methodAndFieldAndSetter3 = null; field core::int? methodAndFieldAndSetter4 = null; final field core::int? methodAndFinalFieldAndSetter2 = 0; + final field core::int? methodAndFinalFieldAndSetter3 = 0; final field core::int? methodAndFinalFieldAndSetter4 = 0; field core::int? fieldAndSetter1 = null; field core::int? fieldAndSetter2 = null; @@ -295,12 +251,10 @@ class Class extends core::Object { method methodAndField1() → core::int? {} method methodAndFinalField1() → core::int? {} method methodAndFieldAndSetter1() → core::int? {} - method methodAndFieldAndSetter3() → core::int? {} method methodAndFinalFieldAndSetter1() → core::int? {} set methodAndFinalFieldAndSetter1(core::int? value) → void {} set methodAndFinalFieldAndSetter2(core::int? value) → void {} set methodAndFinalFieldAndSetter3(core::int? value) → void {} - method methodAndFinalFieldAndSetter3() → core::int? {} set methodAndFinalFieldAndSetter4(core::int? value) → void {} method methodAndSetter1() → core::int? {} set methodAndSetter1(core::int? value) → void {} @@ -311,6 +265,8 @@ class Class extends core::Object { ^"; {} } + set fieldAndFinalFieldAndSetter2(core::int? value) → void {} + set fieldAndFinalFieldAndSetter4(core::int? value) → void {} } static method test(self::Class c) → dynamic { invalid-expression "pkg/front_end/testcases/nnbd/instance_duplicates.dart:80:5: Error: The setter 'methodAndField1' isn't defined for the class 'Class'. @@ -327,19 +283,13 @@ Try correcting the name to the name of an existing setter, or defining a setter c.methodAndFieldAndSetter1 = c.methodAndFieldAndSetter1; ^^^^^^^^^^^^^^^^^^^^^^^^" in c.{}methodAndFieldAndSetter1 = c.{self::Class::methodAndFieldAndSetter1}{() → core::int?}; c.{self::Class::methodAndFieldAndSetter2} = c.{self::Class::methodAndFieldAndSetter2}{core::int?}; - invalid-expression "pkg/front_end/testcases/nnbd/instance_duplicates.dart:86:5: Error: The setter 'methodAndFieldAndSetter3' isn't defined for the class 'Class'. - - 'Class' is from 'pkg/front_end/testcases/nnbd/instance_duplicates.dart'. -Try correcting the name to the name of an existing setter, or defining a setter or field named 'methodAndFieldAndSetter3'. - c.methodAndFieldAndSetter3 = c.methodAndFieldAndSetter3; - ^^^^^^^^^^^^^^^^^^^^^^^^" in c.{}methodAndFieldAndSetter3 = c.{self::Class::methodAndFieldAndSetter3}{() → core::int?}; + c.{self::Class::methodAndFieldAndSetter3} = c.{self::Class::methodAndFieldAndSetter3}{core::int?}; c.{self::Class::methodAndFieldAndSetter4} = c.{self::Class::methodAndFieldAndSetter4}{core::int?}; c.{self::Class::methodAndFinalFieldAndSetter1} = invalid-expression "pkg/front_end/testcases/nnbd/instance_duplicates.dart:88:39: Error: A value of type 'int? Function()' can't be assigned to a variable of type 'int?'. c.methodAndFinalFieldAndSetter1 = c.methodAndFinalFieldAndSetter1; ^" in c.{self::Class::methodAndFinalFieldAndSetter1}{() → core::int?} as{TypeError} core::int?; c.{self::Class::methodAndFinalFieldAndSetter2} = c.{self::Class::methodAndFinalFieldAndSetter2}{core::int?}; - c.{self::Class::methodAndFinalFieldAndSetter3} = invalid-expression "pkg/front_end/testcases/nnbd/instance_duplicates.dart:90:39: Error: A value of type 'int? Function()' can't be assigned to a variable of type 'int?'. - c.methodAndFinalFieldAndSetter3 = c.methodAndFinalFieldAndSetter3; - ^" in c.{self::Class::methodAndFinalFieldAndSetter3}{() → core::int?} as{TypeError} core::int?; + c.{self::Class::methodAndFinalFieldAndSetter3} = c.{self::Class::methodAndFinalFieldAndSetter3}{core::int?}; c.{self::Class::methodAndFinalFieldAndSetter4} = c.{self::Class::methodAndFinalFieldAndSetter4}{core::int?}; c.{self::Class::methodAndSetter1} = invalid-expression "pkg/front_end/testcases/nnbd/instance_duplicates.dart:92:26: Error: A value of type 'int? Function()' can't be assigned to a variable of type 'int?'. c.methodAndSetter1 = c.methodAndSetter1; @@ -348,16 +298,8 @@ Try correcting the name to the name of an existing setter, or defining a setter c.{self::Class::fieldAndSetter1} = c.{self::Class::fieldAndSetter1}{core::int?}; c.{self::Class::fieldAndSetter2} = c.{self::Class::fieldAndSetter2}{core::int?}; c.{self::Class::fieldAndFinalFieldAndSetter1} = c.{self::Class::fieldAndFinalFieldAndSetter1}{core::int?}; - invalid-expression "pkg/front_end/testcases/nnbd/instance_duplicates.dart:97:5: Error: The setter 'fieldAndFinalFieldAndSetter2' isn't defined for the class 'Class'. - - 'Class' is from 'pkg/front_end/testcases/nnbd/instance_duplicates.dart'. -Try correcting the name to the name of an existing setter, or defining a setter or field named 'fieldAndFinalFieldAndSetter2'. - c.fieldAndFinalFieldAndSetter2 = c.fieldAndFinalFieldAndSetter2; - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^" in c.{}fieldAndFinalFieldAndSetter2 = c.{self::Class::fieldAndFinalFieldAndSetter2}{core::int?}; + c.{self::Class::fieldAndFinalFieldAndSetter2} = c.{self::Class::fieldAndFinalFieldAndSetter2}{core::int?}; c.{self::Class::fieldAndFinalFieldAndSetter3} = c.{self::Class::fieldAndFinalFieldAndSetter3}{core::int?}; - invalid-expression "pkg/front_end/testcases/nnbd/instance_duplicates.dart:99:5: Error: The setter 'fieldAndFinalFieldAndSetter4' isn't defined for the class 'Class'. - - 'Class' is from 'pkg/front_end/testcases/nnbd/instance_duplicates.dart'. -Try correcting the name to the name of an existing setter, or defining a setter or field named 'fieldAndFinalFieldAndSetter4'. - c.fieldAndFinalFieldAndSetter4 = c.fieldAndFinalFieldAndSetter4; - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^" in c.{}fieldAndFinalFieldAndSetter4 = c.{self::Class::fieldAndFinalFieldAndSetter4}{core::int?}; + c.{self::Class::fieldAndFinalFieldAndSetter4} = c.{self::Class::fieldAndFinalFieldAndSetter4}{core::int?}; } static method main() → dynamic {} diff --git a/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.outline.expect b/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.outline.expect index e559d78beb81..cfbf659966fb 100644 --- a/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.outline.expect +++ b/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.outline.expect @@ -42,6 +42,20 @@ library; // int? methodAndFieldAndSetter1() {} // ^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:20:12: Error: The setter conflicts with declaration 'methodAndFieldAndSetter1'. +// void set methodAndFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:18:8: Context: Conflicting declaration 'methodAndFieldAndSetter1'. +// int? methodAndFieldAndSetter1() {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:20:12: Error: Conflicts with the implicit setter of the field 'methodAndFieldAndSetter1'. +// void set methodAndFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:19:8: Context: Field 'methodAndFieldAndSetter1' with the implicit setter. +// int? methodAndFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:23:8: Error: 'methodAndFieldAndSetter2' is already declared in this scope. // int? methodAndFieldAndSetter2() {} // ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -49,12 +63,33 @@ library; // int? methodAndFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:28:8: Error: 'methodAndFieldAndSetter3' is already declared in this scope. -// int? methodAndFieldAndSetter3; +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:24:12: Error: Conflicts with the implicit setter of the field 'methodAndFieldAndSetter2'. +// void set methodAndFieldAndSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:22:8: Context: Field 'methodAndFieldAndSetter2' with the implicit setter. +// int? methodAndFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:27:8: Context: Previous declaration of 'methodAndFieldAndSetter3'. +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:27:8: Error: The declaration conflicts with setter 'methodAndFieldAndSetter3'. // int? methodAndFieldAndSetter3() {} // ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:26:12: Context: Conflicting setter 'methodAndFieldAndSetter3'. +// void set methodAndFieldAndSetter3(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:28:8: Error: Conflicts with setter 'methodAndFieldAndSetter3'. +// int? methodAndFieldAndSetter3; +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:26:12: Context: Conflicting setter 'methodAndFieldAndSetter3'. +// void set methodAndFieldAndSetter3(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:31:8: Error: Conflicts with setter 'methodAndFieldAndSetter4'. +// int? methodAndFieldAndSetter4; +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:30:12: Context: Conflicting setter 'methodAndFieldAndSetter4'. +// void set methodAndFieldAndSetter4(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/instance_duplicates.dart:32:8: Error: 'methodAndFieldAndSetter4' is already declared in this scope. // int? methodAndFieldAndSetter4() {} @@ -70,6 +105,13 @@ library; // int? methodAndFinalFieldAndSetter1() {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:36:12: Error: The setter conflicts with declaration 'methodAndFinalFieldAndSetter1'. +// void set methodAndFinalFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:34:8: Context: Conflicting declaration 'methodAndFinalFieldAndSetter1'. +// int? methodAndFinalFieldAndSetter1() {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:39:8: Error: 'methodAndFinalFieldAndSetter2' is already declared in this scope. // int? methodAndFinalFieldAndSetter2() {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -77,12 +119,12 @@ library; // final int? methodAndFinalFieldAndSetter2 = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:44:14: Error: 'methodAndFinalFieldAndSetter3' is already declared in this scope. -// final int? methodAndFinalFieldAndSetter3 = 0; -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:43:8: Context: Previous declaration of 'methodAndFinalFieldAndSetter3'. +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:43:8: Error: The declaration conflicts with setter 'methodAndFinalFieldAndSetter3'. // int? methodAndFinalFieldAndSetter3() {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:42:12: Context: Conflicting setter 'methodAndFinalFieldAndSetter3'. +// void set methodAndFinalFieldAndSetter3(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/instance_duplicates.dart:48:8: Error: 'methodAndFinalFieldAndSetter4' is already declared in this scope. // int? methodAndFinalFieldAndSetter4() {} @@ -91,6 +133,34 @@ library; // final int? methodAndFinalFieldAndSetter4 = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:51:12: Error: The setter conflicts with declaration 'methodAndSetter1'. +// void set methodAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:50:8: Context: Conflicting declaration 'methodAndSetter1'. +// int? methodAndSetter1() {} +// ^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:54:12: Error: The setter conflicts with declaration 'methodAndSetter2'. +// int? set methodAndSetter2() {} +// ^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:53:8: Context: Conflicting declaration 'methodAndSetter2'. +// void methodAndSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:57:12: Error: Conflicts with the implicit setter of the field 'fieldAndSetter1'. +// void set fieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:56:8: Context: Field 'fieldAndSetter1' with the implicit setter. +// int? fieldAndSetter1; +// ^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:60:12: Error: Conflicts with the implicit setter of the field 'fieldAndSetter2'. +// void set fieldAndSetter2(int? value) {} +// ^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:59:8: Context: Field 'fieldAndSetter2' with the implicit setter. +// int? fieldAndSetter2; +// ^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:63:14: Error: 'fieldAndFinalFieldAndSetter1' is already declared in this scope. // final int? fieldAndFinalFieldAndSetter1 = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -98,6 +168,13 @@ library; // int? fieldAndFinalFieldAndSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:64:12: Error: Conflicts with the implicit setter of the field 'fieldAndFinalFieldAndSetter1'. +// void set fieldAndFinalFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:62:8: Context: Field 'fieldAndFinalFieldAndSetter1' with the implicit setter. +// int? fieldAndFinalFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:67:8: Error: 'fieldAndFinalFieldAndSetter2' is already declared in this scope. // int? fieldAndFinalFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -105,6 +182,13 @@ library; // final int? fieldAndFinalFieldAndSetter2 = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:71:8: Error: Conflicts with setter 'fieldAndFinalFieldAndSetter3'. +// int? fieldAndFinalFieldAndSetter3; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:70:12: Context: Conflicting setter 'fieldAndFinalFieldAndSetter3'. +// void set fieldAndFinalFieldAndSetter3(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:72:14: Error: 'fieldAndFinalFieldAndSetter3' is already declared in this scope. // final int? fieldAndFinalFieldAndSetter3 = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -119,114 +203,6 @@ library; // final int? fieldAndFinalFieldAndSetter4 = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:20:12: Error: Conflicts with the implicit setter of the field 'methodAndFieldAndSetter1'. -// void set methodAndFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:19:8: Error: Conflicts with setter 'methodAndFieldAndSetter1'. -// int? methodAndFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:24:12: Error: Conflicts with the implicit setter of the field 'methodAndFieldAndSetter2'. -// void set methodAndFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:22:8: Error: Conflicts with setter 'methodAndFieldAndSetter2'. -// int? methodAndFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:26:12: Error: Conflicts with the implicit setter of the field 'methodAndFieldAndSetter3'. -// void set methodAndFieldAndSetter3(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:28:8: Error: Conflicts with setter 'methodAndFieldAndSetter3'. -// int? methodAndFieldAndSetter3; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:30:12: Error: Conflicts with the implicit setter of the field 'methodAndFieldAndSetter4'. -// void set methodAndFieldAndSetter4(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:31:8: Error: Conflicts with setter 'methodAndFieldAndSetter4'. -// int? methodAndFieldAndSetter4; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:57:12: Error: Conflicts with the implicit setter of the field 'fieldAndSetter1'. -// void set fieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:56:8: Error: Conflicts with setter 'fieldAndSetter1'. -// int? fieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:60:12: Error: Conflicts with the implicit setter of the field 'fieldAndSetter2'. -// void set fieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:59:8: Error: Conflicts with setter 'fieldAndSetter2'. -// int? fieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:64:12: Error: Conflicts with the implicit setter of the field 'fieldAndFinalFieldAndSetter1'. -// void set fieldAndFinalFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:62:8: Error: Conflicts with setter 'fieldAndFinalFieldAndSetter1'. -// int? fieldAndFinalFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:68:12: Error: Conflicts with the implicit setter of the field 'fieldAndFinalFieldAndSetter2'. -// void set fieldAndFinalFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:67:8: Error: Conflicts with setter 'fieldAndFinalFieldAndSetter2'. -// int? fieldAndFinalFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:70:12: Error: Conflicts with the implicit setter of the field 'fieldAndFinalFieldAndSetter3'. -// void set fieldAndFinalFieldAndSetter3(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:71:8: Error: Conflicts with setter 'fieldAndFinalFieldAndSetter3'. -// int? fieldAndFinalFieldAndSetter3; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:74:12: Error: Conflicts with the implicit setter of the field 'fieldAndFinalFieldAndSetter4'. -// void set fieldAndFinalFieldAndSetter4(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:76:8: Error: Conflicts with setter 'fieldAndFinalFieldAndSetter4'. -// int? fieldAndFinalFieldAndSetter4; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:36:12: Error: 'methodAndFinalFieldAndSetter1' is already declared in this scope. -// void set methodAndFinalFieldAndSetter1(int? value) {} -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:34:8: Context: Previous declaration of 'methodAndFinalFieldAndSetter1'. -// int? methodAndFinalFieldAndSetter1() {} -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:43:8: Error: 'methodAndFinalFieldAndSetter3' is already declared in this scope. -// int? methodAndFinalFieldAndSetter3() {} -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:42:12: Context: Previous declaration of 'methodAndFinalFieldAndSetter3'. -// void set methodAndFinalFieldAndSetter3(int? value) {} -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:51:12: Error: 'methodAndSetter1' is already declared in this scope. -// void set methodAndSetter1(int? value) {} -// ^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:50:8: Context: Previous declaration of 'methodAndSetter1'. -// int? methodAndSetter1() {} -// ^^^^^^^^^^^^^^^^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:54:12: Error: 'methodAndSetter2' is already declared in this scope. -// int? set methodAndSetter2() {} -// ^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:53:8: Context: Previous declaration of 'methodAndSetter2'. -// void methodAndSetter2(int? value) {} -// ^^^^^^^^^^^^^^^^ -// import self as self; import "dart:core" as core; @@ -234,8 +210,10 @@ class Class extends core::Object { field core::int? methodAndField2; final field core::int? methodAndFinalField2; field core::int? methodAndFieldAndSetter2; + field core::int? methodAndFieldAndSetter3; field core::int? methodAndFieldAndSetter4; final field core::int? methodAndFinalFieldAndSetter2; + final field core::int? methodAndFinalFieldAndSetter3; final field core::int? methodAndFinalFieldAndSetter4; field core::int? fieldAndSetter1; field core::int? fieldAndSetter2; @@ -251,8 +229,6 @@ class Class extends core::Object { ; method methodAndFieldAndSetter1() → core::int? ; - method methodAndFieldAndSetter3() → core::int? - ; method methodAndFinalFieldAndSetter1() → core::int? ; set methodAndFinalFieldAndSetter1(core::int? value) → void @@ -261,8 +237,6 @@ class Class extends core::Object { ; set methodAndFinalFieldAndSetter3(core::int? value) → void ; - method methodAndFinalFieldAndSetter3() → core::int? - ; set methodAndFinalFieldAndSetter4(core::int? value) → void ; method methodAndSetter1() → core::int? @@ -273,6 +247,10 @@ class Class extends core::Object { ; set methodAndSetter2(dynamic #synthetic) → void ; + set fieldAndFinalFieldAndSetter2(core::int? value) → void + ; + set fieldAndFinalFieldAndSetter4(core::int? value) → void + ; } static method test(self::Class c) → dynamic ; diff --git a/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.transformed.expect index c12d5e6c519e..efd26c7bef14 100644 --- a/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.transformed.expect @@ -42,6 +42,20 @@ library; // int? methodAndFieldAndSetter1() {} // ^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:20:12: Error: The setter conflicts with declaration 'methodAndFieldAndSetter1'. +// void set methodAndFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:18:8: Context: Conflicting declaration 'methodAndFieldAndSetter1'. +// int? methodAndFieldAndSetter1() {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:20:12: Error: Conflicts with the implicit setter of the field 'methodAndFieldAndSetter1'. +// void set methodAndFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:19:8: Context: Field 'methodAndFieldAndSetter1' with the implicit setter. +// int? methodAndFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:23:8: Error: 'methodAndFieldAndSetter2' is already declared in this scope. // int? methodAndFieldAndSetter2() {} // ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -49,12 +63,33 @@ library; // int? methodAndFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:28:8: Error: 'methodAndFieldAndSetter3' is already declared in this scope. -// int? methodAndFieldAndSetter3; +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:24:12: Error: Conflicts with the implicit setter of the field 'methodAndFieldAndSetter2'. +// void set methodAndFieldAndSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:22:8: Context: Field 'methodAndFieldAndSetter2' with the implicit setter. +// int? methodAndFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:27:8: Context: Previous declaration of 'methodAndFieldAndSetter3'. +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:27:8: Error: The declaration conflicts with setter 'methodAndFieldAndSetter3'. // int? methodAndFieldAndSetter3() {} // ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:26:12: Context: Conflicting setter 'methodAndFieldAndSetter3'. +// void set methodAndFieldAndSetter3(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:28:8: Error: Conflicts with setter 'methodAndFieldAndSetter3'. +// int? methodAndFieldAndSetter3; +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:26:12: Context: Conflicting setter 'methodAndFieldAndSetter3'. +// void set methodAndFieldAndSetter3(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:31:8: Error: Conflicts with setter 'methodAndFieldAndSetter4'. +// int? methodAndFieldAndSetter4; +// ^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:30:12: Context: Conflicting setter 'methodAndFieldAndSetter4'. +// void set methodAndFieldAndSetter4(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/instance_duplicates.dart:32:8: Error: 'methodAndFieldAndSetter4' is already declared in this scope. // int? methodAndFieldAndSetter4() {} @@ -70,6 +105,13 @@ library; // int? methodAndFinalFieldAndSetter1() {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:36:12: Error: The setter conflicts with declaration 'methodAndFinalFieldAndSetter1'. +// void set methodAndFinalFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:34:8: Context: Conflicting declaration 'methodAndFinalFieldAndSetter1'. +// int? methodAndFinalFieldAndSetter1() {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:39:8: Error: 'methodAndFinalFieldAndSetter2' is already declared in this scope. // int? methodAndFinalFieldAndSetter2() {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -77,12 +119,12 @@ library; // final int? methodAndFinalFieldAndSetter2 = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:44:14: Error: 'methodAndFinalFieldAndSetter3' is already declared in this scope. -// final int? methodAndFinalFieldAndSetter3 = 0; -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:43:8: Context: Previous declaration of 'methodAndFinalFieldAndSetter3'. +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:43:8: Error: The declaration conflicts with setter 'methodAndFinalFieldAndSetter3'. // int? methodAndFinalFieldAndSetter3() {} // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:42:12: Context: Conflicting setter 'methodAndFinalFieldAndSetter3'. +// void set methodAndFinalFieldAndSetter3(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/instance_duplicates.dart:48:8: Error: 'methodAndFinalFieldAndSetter4' is already declared in this scope. // int? methodAndFinalFieldAndSetter4() {} @@ -91,6 +133,34 @@ library; // final int? methodAndFinalFieldAndSetter4 = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:51:12: Error: The setter conflicts with declaration 'methodAndSetter1'. +// void set methodAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:50:8: Context: Conflicting declaration 'methodAndSetter1'. +// int? methodAndSetter1() {} +// ^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:54:12: Error: The setter conflicts with declaration 'methodAndSetter2'. +// int? set methodAndSetter2() {} +// ^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:53:8: Context: Conflicting declaration 'methodAndSetter2'. +// void methodAndSetter2(int? value) {} +// ^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:57:12: Error: Conflicts with the implicit setter of the field 'fieldAndSetter1'. +// void set fieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:56:8: Context: Field 'fieldAndSetter1' with the implicit setter. +// int? fieldAndSetter1; +// ^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:60:12: Error: Conflicts with the implicit setter of the field 'fieldAndSetter2'. +// void set fieldAndSetter2(int? value) {} +// ^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:59:8: Context: Field 'fieldAndSetter2' with the implicit setter. +// int? fieldAndSetter2; +// ^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:63:14: Error: 'fieldAndFinalFieldAndSetter1' is already declared in this scope. // final int? fieldAndFinalFieldAndSetter1 = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -98,6 +168,13 @@ library; // int? fieldAndFinalFieldAndSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:64:12: Error: Conflicts with the implicit setter of the field 'fieldAndFinalFieldAndSetter1'. +// void set fieldAndFinalFieldAndSetter1(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:62:8: Context: Field 'fieldAndFinalFieldAndSetter1' with the implicit setter. +// int? fieldAndFinalFieldAndSetter1; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:67:8: Error: 'fieldAndFinalFieldAndSetter2' is already declared in this scope. // int? fieldAndFinalFieldAndSetter2; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -105,6 +182,13 @@ library; // final int? fieldAndFinalFieldAndSetter2 = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:71:8: Error: Conflicts with setter 'fieldAndFinalFieldAndSetter3'. +// int? fieldAndFinalFieldAndSetter3; +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/instance_duplicates.dart:70:12: Context: Conflicting setter 'fieldAndFinalFieldAndSetter3'. +// void set fieldAndFinalFieldAndSetter3(int? value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:72:14: Error: 'fieldAndFinalFieldAndSetter3' is already declared in this scope. // final int? fieldAndFinalFieldAndSetter3 = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -119,114 +203,6 @@ library; // final int? fieldAndFinalFieldAndSetter4 = 0; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:20:12: Error: Conflicts with the implicit setter of the field 'methodAndFieldAndSetter1'. -// void set methodAndFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:19:8: Error: Conflicts with setter 'methodAndFieldAndSetter1'. -// int? methodAndFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:24:12: Error: Conflicts with the implicit setter of the field 'methodAndFieldAndSetter2'. -// void set methodAndFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:22:8: Error: Conflicts with setter 'methodAndFieldAndSetter2'. -// int? methodAndFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:26:12: Error: Conflicts with the implicit setter of the field 'methodAndFieldAndSetter3'. -// void set methodAndFieldAndSetter3(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:28:8: Error: Conflicts with setter 'methodAndFieldAndSetter3'. -// int? methodAndFieldAndSetter3; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:30:12: Error: Conflicts with the implicit setter of the field 'methodAndFieldAndSetter4'. -// void set methodAndFieldAndSetter4(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:31:8: Error: Conflicts with setter 'methodAndFieldAndSetter4'. -// int? methodAndFieldAndSetter4; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:57:12: Error: Conflicts with the implicit setter of the field 'fieldAndSetter1'. -// void set fieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:56:8: Error: Conflicts with setter 'fieldAndSetter1'. -// int? fieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:60:12: Error: Conflicts with the implicit setter of the field 'fieldAndSetter2'. -// void set fieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:59:8: Error: Conflicts with setter 'fieldAndSetter2'. -// int? fieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:64:12: Error: Conflicts with the implicit setter of the field 'fieldAndFinalFieldAndSetter1'. -// void set fieldAndFinalFieldAndSetter1(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:62:8: Error: Conflicts with setter 'fieldAndFinalFieldAndSetter1'. -// int? fieldAndFinalFieldAndSetter1; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:68:12: Error: Conflicts with the implicit setter of the field 'fieldAndFinalFieldAndSetter2'. -// void set fieldAndFinalFieldAndSetter2(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:67:8: Error: Conflicts with setter 'fieldAndFinalFieldAndSetter2'. -// int? fieldAndFinalFieldAndSetter2; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:70:12: Error: Conflicts with the implicit setter of the field 'fieldAndFinalFieldAndSetter3'. -// void set fieldAndFinalFieldAndSetter3(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:71:8: Error: Conflicts with setter 'fieldAndFinalFieldAndSetter3'. -// int? fieldAndFinalFieldAndSetter3; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:74:12: Error: Conflicts with the implicit setter of the field 'fieldAndFinalFieldAndSetter4'. -// void set fieldAndFinalFieldAndSetter4(int? value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:76:8: Error: Conflicts with setter 'fieldAndFinalFieldAndSetter4'. -// int? fieldAndFinalFieldAndSetter4; -// ^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:36:12: Error: 'methodAndFinalFieldAndSetter1' is already declared in this scope. -// void set methodAndFinalFieldAndSetter1(int? value) {} -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:34:8: Context: Previous declaration of 'methodAndFinalFieldAndSetter1'. -// int? methodAndFinalFieldAndSetter1() {} -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:43:8: Error: 'methodAndFinalFieldAndSetter3' is already declared in this scope. -// int? methodAndFinalFieldAndSetter3() {} -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:42:12: Context: Previous declaration of 'methodAndFinalFieldAndSetter3'. -// void set methodAndFinalFieldAndSetter3(int? value) {} -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:51:12: Error: 'methodAndSetter1' is already declared in this scope. -// void set methodAndSetter1(int? value) {} -// ^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:50:8: Context: Previous declaration of 'methodAndSetter1'. -// int? methodAndSetter1() {} -// ^^^^^^^^^^^^^^^^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:54:12: Error: 'methodAndSetter2' is already declared in this scope. -// int? set methodAndSetter2() {} -// ^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:53:8: Context: Previous declaration of 'methodAndSetter2'. -// void methodAndSetter2(int? value) {} -// ^^^^^^^^^^^^^^^^ -// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:54:28: Error: A setter should have exactly one formal parameter. // int? set methodAndSetter2() {} // ^ @@ -243,36 +219,14 @@ library; // c.methodAndFieldAndSetter1 = c.methodAndFieldAndSetter1; // ^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:86:5: Error: The setter 'methodAndFieldAndSetter3' isn't defined for the class 'Class'. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/instance_duplicates.dart'. -// Try correcting the name to the name of an existing setter, or defining a setter or field named 'methodAndFieldAndSetter3'. -// c.methodAndFieldAndSetter3 = c.methodAndFieldAndSetter3; -// ^^^^^^^^^^^^^^^^^^^^^^^^ -// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:88:39: Error: A value of type 'int? Function()' can't be assigned to a variable of type 'int?'. // c.methodAndFinalFieldAndSetter1 = c.methodAndFinalFieldAndSetter1; // ^ // -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:90:39: Error: A value of type 'int? Function()' can't be assigned to a variable of type 'int?'. -// c.methodAndFinalFieldAndSetter3 = c.methodAndFinalFieldAndSetter3; -// ^ -// // pkg/front_end/testcases/nnbd/instance_duplicates.dart:92:26: Error: A value of type 'int? Function()' can't be assigned to a variable of type 'int?'. // c.methodAndSetter1 = c.methodAndSetter1; // ^ // -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:97:5: Error: The setter 'fieldAndFinalFieldAndSetter2' isn't defined for the class 'Class'. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/instance_duplicates.dart'. -// Try correcting the name to the name of an existing setter, or defining a setter or field named 'fieldAndFinalFieldAndSetter2'. -// c.fieldAndFinalFieldAndSetter2 = c.fieldAndFinalFieldAndSetter2; -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// -// pkg/front_end/testcases/nnbd/instance_duplicates.dart:99:5: Error: The setter 'fieldAndFinalFieldAndSetter4' isn't defined for the class 'Class'. -// - 'Class' is from 'pkg/front_end/testcases/nnbd/instance_duplicates.dart'. -// Try correcting the name to the name of an existing setter, or defining a setter or field named 'fieldAndFinalFieldAndSetter4'. -// c.fieldAndFinalFieldAndSetter4 = c.fieldAndFinalFieldAndSetter4; -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// import self as self; import "dart:core" as core; @@ -280,8 +234,10 @@ class Class extends core::Object { field core::int? methodAndField2 = null; final field core::int? methodAndFinalField2 = 0; field core::int? methodAndFieldAndSetter2 = null; + field core::int? methodAndFieldAndSetter3 = null; field core::int? methodAndFieldAndSetter4 = null; final field core::int? methodAndFinalFieldAndSetter2 = 0; + final field core::int? methodAndFinalFieldAndSetter3 = 0; final field core::int? methodAndFinalFieldAndSetter4 = 0; field core::int? fieldAndSetter1 = null; field core::int? fieldAndSetter2 = null; @@ -295,12 +251,10 @@ class Class extends core::Object { method methodAndField1() → core::int? {} method methodAndFinalField1() → core::int? {} method methodAndFieldAndSetter1() → core::int? {} - method methodAndFieldAndSetter3() → core::int? {} method methodAndFinalFieldAndSetter1() → core::int? {} set methodAndFinalFieldAndSetter1(core::int? value) → void {} set methodAndFinalFieldAndSetter2(core::int? value) → void {} set methodAndFinalFieldAndSetter3(core::int? value) → void {} - method methodAndFinalFieldAndSetter3() → core::int? {} set methodAndFinalFieldAndSetter4(core::int? value) → void {} method methodAndSetter1() → core::int? {} set methodAndSetter1(core::int? value) → void {} @@ -311,6 +265,8 @@ class Class extends core::Object { ^"; {} } + set fieldAndFinalFieldAndSetter2(core::int? value) → void {} + set fieldAndFinalFieldAndSetter4(core::int? value) → void {} } static method test(self::Class c) → dynamic { invalid-expression "pkg/front_end/testcases/nnbd/instance_duplicates.dart:80:5: Error: The setter 'methodAndField1' isn't defined for the class 'Class'. @@ -327,19 +283,13 @@ Try correcting the name to the name of an existing setter, or defining a setter c.methodAndFieldAndSetter1 = c.methodAndFieldAndSetter1; ^^^^^^^^^^^^^^^^^^^^^^^^" in c.{}methodAndFieldAndSetter1 = c.{self::Class::methodAndFieldAndSetter1}{() → core::int?}; c.{self::Class::methodAndFieldAndSetter2} = c.{self::Class::methodAndFieldAndSetter2}{core::int?}; - invalid-expression "pkg/front_end/testcases/nnbd/instance_duplicates.dart:86:5: Error: The setter 'methodAndFieldAndSetter3' isn't defined for the class 'Class'. - - 'Class' is from 'pkg/front_end/testcases/nnbd/instance_duplicates.dart'. -Try correcting the name to the name of an existing setter, or defining a setter or field named 'methodAndFieldAndSetter3'. - c.methodAndFieldAndSetter3 = c.methodAndFieldAndSetter3; - ^^^^^^^^^^^^^^^^^^^^^^^^" in c.{}methodAndFieldAndSetter3 = c.{self::Class::methodAndFieldAndSetter3}{() → core::int?}; + c.{self::Class::methodAndFieldAndSetter3} = c.{self::Class::methodAndFieldAndSetter3}{core::int?}; c.{self::Class::methodAndFieldAndSetter4} = c.{self::Class::methodAndFieldAndSetter4}{core::int?}; c.{self::Class::methodAndFinalFieldAndSetter1} = invalid-expression "pkg/front_end/testcases/nnbd/instance_duplicates.dart:88:39: Error: A value of type 'int? Function()' can't be assigned to a variable of type 'int?'. c.methodAndFinalFieldAndSetter1 = c.methodAndFinalFieldAndSetter1; ^" in c.{self::Class::methodAndFinalFieldAndSetter1}{() → core::int?} as{TypeError} core::int?; c.{self::Class::methodAndFinalFieldAndSetter2} = c.{self::Class::methodAndFinalFieldAndSetter2}{core::int?}; - c.{self::Class::methodAndFinalFieldAndSetter3} = invalid-expression "pkg/front_end/testcases/nnbd/instance_duplicates.dart:90:39: Error: A value of type 'int? Function()' can't be assigned to a variable of type 'int?'. - c.methodAndFinalFieldAndSetter3 = c.methodAndFinalFieldAndSetter3; - ^" in c.{self::Class::methodAndFinalFieldAndSetter3}{() → core::int?} as{TypeError} core::int?; + c.{self::Class::methodAndFinalFieldAndSetter3} = c.{self::Class::methodAndFinalFieldAndSetter3}{core::int?}; c.{self::Class::methodAndFinalFieldAndSetter4} = c.{self::Class::methodAndFinalFieldAndSetter4}{core::int?}; c.{self::Class::methodAndSetter1} = invalid-expression "pkg/front_end/testcases/nnbd/instance_duplicates.dart:92:26: Error: A value of type 'int? Function()' can't be assigned to a variable of type 'int?'. c.methodAndSetter1 = c.methodAndSetter1; @@ -348,16 +298,8 @@ Try correcting the name to the name of an existing setter, or defining a setter c.{self::Class::fieldAndSetter1} = c.{self::Class::fieldAndSetter1}{core::int?}; c.{self::Class::fieldAndSetter2} = c.{self::Class::fieldAndSetter2}{core::int?}; c.{self::Class::fieldAndFinalFieldAndSetter1} = c.{self::Class::fieldAndFinalFieldAndSetter1}{core::int?}; - invalid-expression "pkg/front_end/testcases/nnbd/instance_duplicates.dart:97:5: Error: The setter 'fieldAndFinalFieldAndSetter2' isn't defined for the class 'Class'. - - 'Class' is from 'pkg/front_end/testcases/nnbd/instance_duplicates.dart'. -Try correcting the name to the name of an existing setter, or defining a setter or field named 'fieldAndFinalFieldAndSetter2'. - c.fieldAndFinalFieldAndSetter2 = c.fieldAndFinalFieldAndSetter2; - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^" in c.{}fieldAndFinalFieldAndSetter2 = c.{self::Class::fieldAndFinalFieldAndSetter2}{core::int?}; + c.{self::Class::fieldAndFinalFieldAndSetter2} = c.{self::Class::fieldAndFinalFieldAndSetter2}{core::int?}; c.{self::Class::fieldAndFinalFieldAndSetter3} = c.{self::Class::fieldAndFinalFieldAndSetter3}{core::int?}; - invalid-expression "pkg/front_end/testcases/nnbd/instance_duplicates.dart:99:5: Error: The setter 'fieldAndFinalFieldAndSetter4' isn't defined for the class 'Class'. - - 'Class' is from 'pkg/front_end/testcases/nnbd/instance_duplicates.dart'. -Try correcting the name to the name of an existing setter, or defining a setter or field named 'fieldAndFinalFieldAndSetter4'. - c.fieldAndFinalFieldAndSetter4 = c.fieldAndFinalFieldAndSetter4; - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^" in c.{}fieldAndFinalFieldAndSetter4 = c.{self::Class::fieldAndFinalFieldAndSetter4}{core::int?}; + c.{self::Class::fieldAndFinalFieldAndSetter4} = c.{self::Class::fieldAndFinalFieldAndSetter4}{core::int?}; } static method main() → dynamic {} diff --git a/pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart.strong.expect b/pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart.strong.expect index f6a9c2ceacbe..626fd90329c7 100644 --- a/pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart.strong.expect @@ -7,6 +7,20 @@ library; // void set Class(value) {} // ^^^^^ // +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:6:10: Error: The setter conflicts with declaration 'topLevelMethodAndSetter'. +// void set topLevelMethodAndSetter(value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:5:1: Context: Conflicting declaration 'topLevelMethodAndSetter'. +// topLevelMethodAndSetter() {} +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:9:10: Error: The setter conflicts with declaration 'topLevelMethodAndSetter'. +// void set topLevelMethodAndSetter(value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:5:1: Context: Conflicting declaration 'topLevelMethodAndSetter'. +// topLevelMethodAndSetter() {} +// ^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:9:10: Error: 'topLevelMethodAndSetter' is already declared in this scope. // void set topLevelMethodAndSetter(value) {} // ^^^^^^^^^^^^^^^^^^^^^^^ @@ -14,71 +28,68 @@ library; // void set topLevelMethodAndSetter(value) {} // ^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:9:10: Error: Conflicts with member 'topLevelMethodAndSetter'. -// void set topLevelMethodAndSetter(value) {} -// ^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:13:10: Error: The setter conflicts with declaration 'classAndSetter'. +// void set classAndSetter(value) {} +// ^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:11:7: Context: Conflicting declaration 'classAndSetter'. +// class classAndSetter {} +// ^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:6:10: Error: Conflicts with member 'topLevelMethodAndSetter'. -// void set topLevelMethodAndSetter(value) {} -// ^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:17:12: Error: The setter conflicts with declaration 'instanceMethodAndSetter'. +// void set instanceMethodAndSetter(value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:16:3: Context: Conflicting declaration 'instanceMethodAndSetter'. +// instanceMethodAndSetter() {} +// ^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:5:1: Error: Conflicts with setter 'topLevelMethodAndSetter'. -// topLevelMethodAndSetter() {} -// ^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:20:19: Error: The setter conflicts with declaration 'staticMethodAndSetter'. +// static void set staticMethodAndSetter(value) {} +// ^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:19:10: Context: Conflicting declaration 'staticMethodAndSetter'. +// static staticMethodAndSetter() {} +// ^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:13:10: Error: Conflicts with member 'classAndSetter'. -// void set classAndSetter(value) {} -// ^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:23:19: Error: The setter conflicts with declaration 'instanceMethodAndStaticSetter'. +// static void set instanceMethodAndStaticSetter(value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:22:3: Context: Conflicting declaration 'instanceMethodAndStaticSetter'. +// instanceMethodAndStaticSetter() {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:11:7: Error: Conflicts with setter 'classAndSetter'. -// class classAndSetter {} -// ^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:26:12: Error: The setter conflicts with declaration 'staticMethodAndInstanceSetter'. +// void set staticMethodAndInstanceSetter(value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:25:10: Context: Conflicting declaration 'staticMethodAndInstanceSetter'. +// static staticMethodAndInstanceSetter() {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:34:12: Error: Conflicts with member 'extensionInstanceMethodAndSetter'. +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:34:12: Error: The setter conflicts with declaration 'extensionInstanceMethodAndSetter'. // void set extensionInstanceMethodAndSetter(value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:33:3: Error: Conflicts with setter 'extensionInstanceMethodAndSetter'. +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:33:3: Context: Conflicting declaration 'extensionInstanceMethodAndSetter'. // extensionInstanceMethodAndSetter() {} -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:37:19: Error: Conflicts with member 'extensionStaticMethodAndSetter'. +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:37:19: Error: The setter conflicts with declaration 'extensionStaticMethodAndSetter'. // static void set extensionStaticMethodAndSetter(value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:36:10: Error: Conflicts with setter 'extensionStaticMethodAndSetter'. +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:36:10: Context: Conflicting declaration 'extensionStaticMethodAndSetter'. // static extensionStaticMethodAndSetter() {} -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:40:19: Error: Conflicts with member 'extensionInstanceMethodAndStaticSetter'. +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:40:19: Error: The setter conflicts with declaration 'extensionInstanceMethodAndStaticSetter'. // static void set extensionInstanceMethodAndStaticSetter(value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:39:3: Error: Conflicts with setter 'extensionInstanceMethodAndStaticSetter'. +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:39:3: Context: Conflicting declaration 'extensionInstanceMethodAndStaticSetter'. // extensionInstanceMethodAndStaticSetter() {} -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:43:12: Error: Conflicts with member 'extensionStaticMethodAndInstanceSetter'. +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:43:12: Error: The setter conflicts with declaration 'extensionStaticMethodAndInstanceSetter'. // void set extensionStaticMethodAndInstanceSetter(value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:42:10: Error: Conflicts with setter 'extensionStaticMethodAndInstanceSetter'. +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:42:10: Context: Conflicting declaration 'extensionStaticMethodAndInstanceSetter'. // static extensionStaticMethodAndInstanceSetter() {} -// ^ -// -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:17:12: Error: 'instanceMethodAndSetter' is already declared in this scope. -// void set instanceMethodAndSetter(value) {} -// ^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:16:3: Context: Previous declaration of 'instanceMethodAndSetter'. -// instanceMethodAndSetter() {} -// ^^^^^^^^^^^^^^^^^^^^^^^ -// -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:20:19: Error: 'staticMethodAndSetter' is already declared in this scope. -// static void set staticMethodAndSetter(value) {} -// ^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:19:10: Context: Previous declaration of 'staticMethodAndSetter'. -// static staticMethodAndSetter() {} -// ^^^^^^^^^^^^^^^^^^^^^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:23:19: Error: This static member conflicts with an instance member. // static void set instanceMethodAndStaticSetter(value) {} diff --git a/pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart.strong.modular.expect b/pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart.strong.modular.expect index f6a9c2ceacbe..626fd90329c7 100644 --- a/pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart.strong.modular.expect +++ b/pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart.strong.modular.expect @@ -7,6 +7,20 @@ library; // void set Class(value) {} // ^^^^^ // +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:6:10: Error: The setter conflicts with declaration 'topLevelMethodAndSetter'. +// void set topLevelMethodAndSetter(value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:5:1: Context: Conflicting declaration 'topLevelMethodAndSetter'. +// topLevelMethodAndSetter() {} +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:9:10: Error: The setter conflicts with declaration 'topLevelMethodAndSetter'. +// void set topLevelMethodAndSetter(value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:5:1: Context: Conflicting declaration 'topLevelMethodAndSetter'. +// topLevelMethodAndSetter() {} +// ^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:9:10: Error: 'topLevelMethodAndSetter' is already declared in this scope. // void set topLevelMethodAndSetter(value) {} // ^^^^^^^^^^^^^^^^^^^^^^^ @@ -14,71 +28,68 @@ library; // void set topLevelMethodAndSetter(value) {} // ^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:9:10: Error: Conflicts with member 'topLevelMethodAndSetter'. -// void set topLevelMethodAndSetter(value) {} -// ^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:13:10: Error: The setter conflicts with declaration 'classAndSetter'. +// void set classAndSetter(value) {} +// ^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:11:7: Context: Conflicting declaration 'classAndSetter'. +// class classAndSetter {} +// ^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:6:10: Error: Conflicts with member 'topLevelMethodAndSetter'. -// void set topLevelMethodAndSetter(value) {} -// ^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:17:12: Error: The setter conflicts with declaration 'instanceMethodAndSetter'. +// void set instanceMethodAndSetter(value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:16:3: Context: Conflicting declaration 'instanceMethodAndSetter'. +// instanceMethodAndSetter() {} +// ^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:5:1: Error: Conflicts with setter 'topLevelMethodAndSetter'. -// topLevelMethodAndSetter() {} -// ^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:20:19: Error: The setter conflicts with declaration 'staticMethodAndSetter'. +// static void set staticMethodAndSetter(value) {} +// ^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:19:10: Context: Conflicting declaration 'staticMethodAndSetter'. +// static staticMethodAndSetter() {} +// ^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:13:10: Error: Conflicts with member 'classAndSetter'. -// void set classAndSetter(value) {} -// ^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:23:19: Error: The setter conflicts with declaration 'instanceMethodAndStaticSetter'. +// static void set instanceMethodAndStaticSetter(value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:22:3: Context: Conflicting declaration 'instanceMethodAndStaticSetter'. +// instanceMethodAndStaticSetter() {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:11:7: Error: Conflicts with setter 'classAndSetter'. -// class classAndSetter {} -// ^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:26:12: Error: The setter conflicts with declaration 'staticMethodAndInstanceSetter'. +// void set staticMethodAndInstanceSetter(value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:25:10: Context: Conflicting declaration 'staticMethodAndInstanceSetter'. +// static staticMethodAndInstanceSetter() {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:34:12: Error: Conflicts with member 'extensionInstanceMethodAndSetter'. +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:34:12: Error: The setter conflicts with declaration 'extensionInstanceMethodAndSetter'. // void set extensionInstanceMethodAndSetter(value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:33:3: Error: Conflicts with setter 'extensionInstanceMethodAndSetter'. +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:33:3: Context: Conflicting declaration 'extensionInstanceMethodAndSetter'. // extensionInstanceMethodAndSetter() {} -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:37:19: Error: Conflicts with member 'extensionStaticMethodAndSetter'. +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:37:19: Error: The setter conflicts with declaration 'extensionStaticMethodAndSetter'. // static void set extensionStaticMethodAndSetter(value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:36:10: Error: Conflicts with setter 'extensionStaticMethodAndSetter'. +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:36:10: Context: Conflicting declaration 'extensionStaticMethodAndSetter'. // static extensionStaticMethodAndSetter() {} -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:40:19: Error: Conflicts with member 'extensionInstanceMethodAndStaticSetter'. +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:40:19: Error: The setter conflicts with declaration 'extensionInstanceMethodAndStaticSetter'. // static void set extensionInstanceMethodAndStaticSetter(value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:39:3: Error: Conflicts with setter 'extensionInstanceMethodAndStaticSetter'. +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:39:3: Context: Conflicting declaration 'extensionInstanceMethodAndStaticSetter'. // extensionInstanceMethodAndStaticSetter() {} -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:43:12: Error: Conflicts with member 'extensionStaticMethodAndInstanceSetter'. +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:43:12: Error: The setter conflicts with declaration 'extensionStaticMethodAndInstanceSetter'. // void set extensionStaticMethodAndInstanceSetter(value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:42:10: Error: Conflicts with setter 'extensionStaticMethodAndInstanceSetter'. +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:42:10: Context: Conflicting declaration 'extensionStaticMethodAndInstanceSetter'. // static extensionStaticMethodAndInstanceSetter() {} -// ^ -// -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:17:12: Error: 'instanceMethodAndSetter' is already declared in this scope. -// void set instanceMethodAndSetter(value) {} -// ^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:16:3: Context: Previous declaration of 'instanceMethodAndSetter'. -// instanceMethodAndSetter() {} -// ^^^^^^^^^^^^^^^^^^^^^^^ -// -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:20:19: Error: 'staticMethodAndSetter' is already declared in this scope. -// static void set staticMethodAndSetter(value) {} -// ^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:19:10: Context: Previous declaration of 'staticMethodAndSetter'. -// static staticMethodAndSetter() {} -// ^^^^^^^^^^^^^^^^^^^^^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:23:19: Error: This static member conflicts with an instance member. // static void set instanceMethodAndStaticSetter(value) {} diff --git a/pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart.strong.outline.expect b/pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart.strong.outline.expect index 3d3deac3b9e7..2e97e3a1abdf 100644 --- a/pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart.strong.outline.expect +++ b/pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart.strong.outline.expect @@ -7,6 +7,20 @@ library; // void set Class(value) {} // ^^^^^ // +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:6:10: Error: The setter conflicts with declaration 'topLevelMethodAndSetter'. +// void set topLevelMethodAndSetter(value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:5:1: Context: Conflicting declaration 'topLevelMethodAndSetter'. +// topLevelMethodAndSetter() {} +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:9:10: Error: The setter conflicts with declaration 'topLevelMethodAndSetter'. +// void set topLevelMethodAndSetter(value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:5:1: Context: Conflicting declaration 'topLevelMethodAndSetter'. +// topLevelMethodAndSetter() {} +// ^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:9:10: Error: 'topLevelMethodAndSetter' is already declared in this scope. // void set topLevelMethodAndSetter(value) {} // ^^^^^^^^^^^^^^^^^^^^^^^ @@ -14,71 +28,68 @@ library; // void set topLevelMethodAndSetter(value) {} // ^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:9:10: Error: Conflicts with member 'topLevelMethodAndSetter'. -// void set topLevelMethodAndSetter(value) {} -// ^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:13:10: Error: The setter conflicts with declaration 'classAndSetter'. +// void set classAndSetter(value) {} +// ^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:11:7: Context: Conflicting declaration 'classAndSetter'. +// class classAndSetter {} +// ^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:6:10: Error: Conflicts with member 'topLevelMethodAndSetter'. -// void set topLevelMethodAndSetter(value) {} -// ^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:17:12: Error: The setter conflicts with declaration 'instanceMethodAndSetter'. +// void set instanceMethodAndSetter(value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:16:3: Context: Conflicting declaration 'instanceMethodAndSetter'. +// instanceMethodAndSetter() {} +// ^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:5:1: Error: Conflicts with setter 'topLevelMethodAndSetter'. -// topLevelMethodAndSetter() {} -// ^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:20:19: Error: The setter conflicts with declaration 'staticMethodAndSetter'. +// static void set staticMethodAndSetter(value) {} +// ^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:19:10: Context: Conflicting declaration 'staticMethodAndSetter'. +// static staticMethodAndSetter() {} +// ^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:13:10: Error: Conflicts with member 'classAndSetter'. -// void set classAndSetter(value) {} -// ^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:23:19: Error: The setter conflicts with declaration 'instanceMethodAndStaticSetter'. +// static void set instanceMethodAndStaticSetter(value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:22:3: Context: Conflicting declaration 'instanceMethodAndStaticSetter'. +// instanceMethodAndStaticSetter() {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:11:7: Error: Conflicts with setter 'classAndSetter'. -// class classAndSetter {} -// ^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:26:12: Error: The setter conflicts with declaration 'staticMethodAndInstanceSetter'. +// void set staticMethodAndInstanceSetter(value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:25:10: Context: Conflicting declaration 'staticMethodAndInstanceSetter'. +// static staticMethodAndInstanceSetter() {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:34:12: Error: Conflicts with member 'extensionInstanceMethodAndSetter'. +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:34:12: Error: The setter conflicts with declaration 'extensionInstanceMethodAndSetter'. // void set extensionInstanceMethodAndSetter(value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:33:3: Error: Conflicts with setter 'extensionInstanceMethodAndSetter'. +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:33:3: Context: Conflicting declaration 'extensionInstanceMethodAndSetter'. // extensionInstanceMethodAndSetter() {} -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:37:19: Error: Conflicts with member 'extensionStaticMethodAndSetter'. +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:37:19: Error: The setter conflicts with declaration 'extensionStaticMethodAndSetter'. // static void set extensionStaticMethodAndSetter(value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:36:10: Error: Conflicts with setter 'extensionStaticMethodAndSetter'. +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:36:10: Context: Conflicting declaration 'extensionStaticMethodAndSetter'. // static extensionStaticMethodAndSetter() {} -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:40:19: Error: Conflicts with member 'extensionInstanceMethodAndStaticSetter'. +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:40:19: Error: The setter conflicts with declaration 'extensionInstanceMethodAndStaticSetter'. // static void set extensionInstanceMethodAndStaticSetter(value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:39:3: Error: Conflicts with setter 'extensionInstanceMethodAndStaticSetter'. +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:39:3: Context: Conflicting declaration 'extensionInstanceMethodAndStaticSetter'. // extensionInstanceMethodAndStaticSetter() {} -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:43:12: Error: Conflicts with member 'extensionStaticMethodAndInstanceSetter'. +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:43:12: Error: The setter conflicts with declaration 'extensionStaticMethodAndInstanceSetter'. // void set extensionStaticMethodAndInstanceSetter(value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:42:10: Error: Conflicts with setter 'extensionStaticMethodAndInstanceSetter'. +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:42:10: Context: Conflicting declaration 'extensionStaticMethodAndInstanceSetter'. // static extensionStaticMethodAndInstanceSetter() {} -// ^ -// -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:17:12: Error: 'instanceMethodAndSetter' is already declared in this scope. -// void set instanceMethodAndSetter(value) {} -// ^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:16:3: Context: Previous declaration of 'instanceMethodAndSetter'. -// instanceMethodAndSetter() {} -// ^^^^^^^^^^^^^^^^^^^^^^^ -// -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:20:19: Error: 'staticMethodAndSetter' is already declared in this scope. -// static void set staticMethodAndSetter(value) {} -// ^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:19:10: Context: Previous declaration of 'staticMethodAndSetter'. -// static staticMethodAndSetter() {} -// ^^^^^^^^^^^^^^^^^^^^^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:23:19: Error: This static member conflicts with an instance member. // static void set instanceMethodAndStaticSetter(value) {} diff --git a/pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart.strong.transformed.expect index f6a9c2ceacbe..626fd90329c7 100644 --- a/pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart.strong.transformed.expect @@ -7,6 +7,20 @@ library; // void set Class(value) {} // ^^^^^ // +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:6:10: Error: The setter conflicts with declaration 'topLevelMethodAndSetter'. +// void set topLevelMethodAndSetter(value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:5:1: Context: Conflicting declaration 'topLevelMethodAndSetter'. +// topLevelMethodAndSetter() {} +// ^^^^^^^^^^^^^^^^^^^^^^^ +// +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:9:10: Error: The setter conflicts with declaration 'topLevelMethodAndSetter'. +// void set topLevelMethodAndSetter(value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:5:1: Context: Conflicting declaration 'topLevelMethodAndSetter'. +// topLevelMethodAndSetter() {} +// ^^^^^^^^^^^^^^^^^^^^^^^ +// // pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:9:10: Error: 'topLevelMethodAndSetter' is already declared in this scope. // void set topLevelMethodAndSetter(value) {} // ^^^^^^^^^^^^^^^^^^^^^^^ @@ -14,71 +28,68 @@ library; // void set topLevelMethodAndSetter(value) {} // ^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:9:10: Error: Conflicts with member 'topLevelMethodAndSetter'. -// void set topLevelMethodAndSetter(value) {} -// ^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:13:10: Error: The setter conflicts with declaration 'classAndSetter'. +// void set classAndSetter(value) {} +// ^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:11:7: Context: Conflicting declaration 'classAndSetter'. +// class classAndSetter {} +// ^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:6:10: Error: Conflicts with member 'topLevelMethodAndSetter'. -// void set topLevelMethodAndSetter(value) {} -// ^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:17:12: Error: The setter conflicts with declaration 'instanceMethodAndSetter'. +// void set instanceMethodAndSetter(value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:16:3: Context: Conflicting declaration 'instanceMethodAndSetter'. +// instanceMethodAndSetter() {} +// ^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:5:1: Error: Conflicts with setter 'topLevelMethodAndSetter'. -// topLevelMethodAndSetter() {} -// ^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:20:19: Error: The setter conflicts with declaration 'staticMethodAndSetter'. +// static void set staticMethodAndSetter(value) {} +// ^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:19:10: Context: Conflicting declaration 'staticMethodAndSetter'. +// static staticMethodAndSetter() {} +// ^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:13:10: Error: Conflicts with member 'classAndSetter'. -// void set classAndSetter(value) {} -// ^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:23:19: Error: The setter conflicts with declaration 'instanceMethodAndStaticSetter'. +// static void set instanceMethodAndStaticSetter(value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:22:3: Context: Conflicting declaration 'instanceMethodAndStaticSetter'. +// instanceMethodAndStaticSetter() {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:11:7: Error: Conflicts with setter 'classAndSetter'. -// class classAndSetter {} -// ^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:26:12: Error: The setter conflicts with declaration 'staticMethodAndInstanceSetter'. +// void set staticMethodAndInstanceSetter(value) {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:25:10: Context: Conflicting declaration 'staticMethodAndInstanceSetter'. +// static staticMethodAndInstanceSetter() {} +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:34:12: Error: Conflicts with member 'extensionInstanceMethodAndSetter'. +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:34:12: Error: The setter conflicts with declaration 'extensionInstanceMethodAndSetter'. // void set extensionInstanceMethodAndSetter(value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:33:3: Error: Conflicts with setter 'extensionInstanceMethodAndSetter'. +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:33:3: Context: Conflicting declaration 'extensionInstanceMethodAndSetter'. // extensionInstanceMethodAndSetter() {} -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:37:19: Error: Conflicts with member 'extensionStaticMethodAndSetter'. +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:37:19: Error: The setter conflicts with declaration 'extensionStaticMethodAndSetter'. // static void set extensionStaticMethodAndSetter(value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:36:10: Error: Conflicts with setter 'extensionStaticMethodAndSetter'. +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:36:10: Context: Conflicting declaration 'extensionStaticMethodAndSetter'. // static extensionStaticMethodAndSetter() {} -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:40:19: Error: Conflicts with member 'extensionInstanceMethodAndStaticSetter'. +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:40:19: Error: The setter conflicts with declaration 'extensionInstanceMethodAndStaticSetter'. // static void set extensionInstanceMethodAndStaticSetter(value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:39:3: Error: Conflicts with setter 'extensionInstanceMethodAndStaticSetter'. +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:39:3: Context: Conflicting declaration 'extensionInstanceMethodAndStaticSetter'. // extensionInstanceMethodAndStaticSetter() {} -// ^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:43:12: Error: Conflicts with member 'extensionStaticMethodAndInstanceSetter'. +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:43:12: Error: The setter conflicts with declaration 'extensionStaticMethodAndInstanceSetter'. // void set extensionStaticMethodAndInstanceSetter(value) {} -// ^ -// -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:42:10: Error: Conflicts with setter 'extensionStaticMethodAndInstanceSetter'. +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:42:10: Context: Conflicting declaration 'extensionStaticMethodAndInstanceSetter'. // static extensionStaticMethodAndInstanceSetter() {} -// ^ -// -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:17:12: Error: 'instanceMethodAndSetter' is already declared in this scope. -// void set instanceMethodAndSetter(value) {} -// ^^^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:16:3: Context: Previous declaration of 'instanceMethodAndSetter'. -// instanceMethodAndSetter() {} -// ^^^^^^^^^^^^^^^^^^^^^^^ -// -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:20:19: Error: 'staticMethodAndSetter' is already declared in this scope. -// static void set staticMethodAndSetter(value) {} -// ^^^^^^^^^^^^^^^^^^^^^ -// pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:19:10: Context: Previous declaration of 'staticMethodAndSetter'. -// static staticMethodAndSetter() {} -// ^^^^^^^^^^^^^^^^^^^^^ +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // pkg/front_end/testcases/nnbd/nonfield_vs_setter.dart:23:19: Error: This static member conflicts with an instance member. // static void set instanceMethodAndStaticSetter(value) {} diff --git a/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.strong.expect b/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.strong.expect index 57f194287a4e..3a1da4d670c6 100644 --- a/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.strong.expect +++ b/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.strong.expect @@ -2,10 +2,10 @@ library; // // Problems in library: // -// pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart:12:12: Error: 'foo' is already declared in this scope. +// pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart:12:12: Error: The setter conflicts with declaration 'foo'. // void set foo(int x); // ^^^ -// pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart:10:8: Context: Previous declaration of 'foo'. +// pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart:10:8: Context: Conflicting declaration 'foo'. // void foo(int x) {} // ^^^ // diff --git a/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.strong.modular.expect b/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.strong.modular.expect index 57f194287a4e..3a1da4d670c6 100644 --- a/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.strong.modular.expect +++ b/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.strong.modular.expect @@ -2,10 +2,10 @@ library; // // Problems in library: // -// pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart:12:12: Error: 'foo' is already declared in this scope. +// pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart:12:12: Error: The setter conflicts with declaration 'foo'. // void set foo(int x); // ^^^ -// pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart:10:8: Context: Previous declaration of 'foo'. +// pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart:10:8: Context: Conflicting declaration 'foo'. // void foo(int x) {} // ^^^ // diff --git a/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.strong.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.strong.outline.expect index e287cb540212..6c187b2474f3 100644 --- a/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.strong.outline.expect +++ b/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.strong.outline.expect @@ -2,10 +2,10 @@ library; // // Problems in library: // -// pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart:12:12: Error: 'foo' is already declared in this scope. +// pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart:12:12: Error: The setter conflicts with declaration 'foo'. // void set foo(int x); // ^^^ -// pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart:10:8: Context: Previous declaration of 'foo'. +// pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart:10:8: Context: Conflicting declaration 'foo'. // void foo(int x) {} // ^^^ // diff --git a/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.strong.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.strong.transformed.expect index af721f87a910..380d468e7840 100644 --- a/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart.strong.transformed.expect @@ -2,10 +2,10 @@ library; // // Problems in library: // -// pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart:12:12: Error: 'foo' is already declared in this scope. +// pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart:12:12: Error: The setter conflicts with declaration 'foo'. // void set foo(int x); // ^^^ -// pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart:10:8: Context: Previous declaration of 'foo'. +// pkg/front_end/testcases/no_such_method_forwarders/setter_not_shadowed_by_method.dart:10:8: Context: Conflicting declaration 'foo'. // void foo(int x) {} // ^^^ // diff --git a/pkg/front_end/testcases/rasta/super.dart.strong.expect b/pkg/front_end/testcases/rasta/super.dart.strong.expect index d2d2cc1acc77..1df797275739 100644 --- a/pkg/front_end/testcases/rasta/super.dart.strong.expect +++ b/pkg/front_end/testcases/rasta/super.dart.strong.expect @@ -2,10 +2,10 @@ library; // // Problems in library: // -// pkg/front_end/testcases/rasta/super.dart:27:7: Error: 'n' is already declared in this scope. +// pkg/front_end/testcases/rasta/super.dart:27:7: Error: The setter conflicts with declaration 'n'. // set n(_) {} // ^ -// pkg/front_end/testcases/rasta/super.dart:26:8: Context: Previous declaration of 'n'. +// pkg/front_end/testcases/rasta/super.dart:26:8: Context: Conflicting declaration 'n'. // void n() {} // ^ // diff --git a/pkg/front_end/testcases/rasta/super.dart.strong.modular.expect b/pkg/front_end/testcases/rasta/super.dart.strong.modular.expect index d2d2cc1acc77..1df797275739 100644 --- a/pkg/front_end/testcases/rasta/super.dart.strong.modular.expect +++ b/pkg/front_end/testcases/rasta/super.dart.strong.modular.expect @@ -2,10 +2,10 @@ library; // // Problems in library: // -// pkg/front_end/testcases/rasta/super.dart:27:7: Error: 'n' is already declared in this scope. +// pkg/front_end/testcases/rasta/super.dart:27:7: Error: The setter conflicts with declaration 'n'. // set n(_) {} // ^ -// pkg/front_end/testcases/rasta/super.dart:26:8: Context: Previous declaration of 'n'. +// pkg/front_end/testcases/rasta/super.dart:26:8: Context: Conflicting declaration 'n'. // void n() {} // ^ // diff --git a/pkg/front_end/testcases/rasta/super.dart.strong.outline.expect b/pkg/front_end/testcases/rasta/super.dart.strong.outline.expect index ae04082541b6..0fc11dee3239 100644 --- a/pkg/front_end/testcases/rasta/super.dart.strong.outline.expect +++ b/pkg/front_end/testcases/rasta/super.dart.strong.outline.expect @@ -2,10 +2,10 @@ library; // // Problems in library: // -// pkg/front_end/testcases/rasta/super.dart:27:7: Error: 'n' is already declared in this scope. +// pkg/front_end/testcases/rasta/super.dart:27:7: Error: The setter conflicts with declaration 'n'. // set n(_) {} // ^ -// pkg/front_end/testcases/rasta/super.dart:26:8: Context: Previous declaration of 'n'. +// pkg/front_end/testcases/rasta/super.dart:26:8: Context: Conflicting declaration 'n'. // void n() {} // ^ // diff --git a/pkg/front_end/testcases/rasta/super.dart.strong.transformed.expect b/pkg/front_end/testcases/rasta/super.dart.strong.transformed.expect index d7b059bf1f88..f25dfa84d24f 100644 --- a/pkg/front_end/testcases/rasta/super.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/rasta/super.dart.strong.transformed.expect @@ -2,10 +2,10 @@ library; // // Problems in library: // -// pkg/front_end/testcases/rasta/super.dart:27:7: Error: 'n' is already declared in this scope. +// pkg/front_end/testcases/rasta/super.dart:27:7: Error: The setter conflicts with declaration 'n'. // set n(_) {} // ^ -// pkg/front_end/testcases/rasta/super.dart:26:8: Context: Previous declaration of 'n'. +// pkg/front_end/testcases/rasta/super.dart:26:8: Context: Conflicting declaration 'n'. // void n() {} // ^ // diff --git a/pkg/front_end/testcases/regress/utf_16_le_content.crash_dart.strong.expect b/pkg/front_end/testcases/regress/utf_16_le_content.crash_dart.strong.expect index 5a6ea7d0c92ba82cd6cf5602a783d31d38acce41..e24b5ed6565895be9129228407845c8f20e56df9 100644 GIT binary patch delta 743 zcmY+CT}abW7{+;@{kLWP=PbfSDa{y(AB8K>K#G+R#rzo2*G8yi8D){xipt8B)nr6Q zSuZtVAtZ&BMYb2aSasFSBruA)2u9tsAPJ%yuR7cQn%x|J=Q+=L;XKb7`({t3?4e6E ziYJTYKp~cq=!?-oTyV#vNk<`^#JgV7Jbvhcn`3#VXZ$OI4eaYBizJH?#SAVdxmALG znh{)d(=(+>%!NI(Mb@pbajX={Sx!!@fJG+CFlmzF3RDu;PLhp3m!X_rJ7DEh9m0IC z(bOzUDzK6y>P7?Qm_ueYFl!A(u$_HH(74YJPiB&`F0ICDO(HdldCi!bT3)TDI@e<~ z`xfb~K^4i#b?}nGX%CJY%=Yi<#z-Bej5EhZlur9Ro6u$vy&hXh96mG=zv@@H6x72< zGPDId{u8|0F!)bs%w^1v2WhS}?L<(McYd^yc$*O=gM+*ABFn8LiM?o<=Hz}nAQ|_o zWF>hJ#Rg~dzJ3_(#-8&#@g-+t-!c3&&~pk_DGI`+37^0r;;Jxd^5!&-XcFwgStazS zHokVlOmegf-73S2n4jef#Q7=G`Aj(XAKu?+Z_UN{<1(H?)Y?P5IfAr-fvfm!;JJm+ zdF?e^G4_=@Y?A21zC20XMhVIA-Aw-&$n=qp;XGwnwf1%p9}IjnM|JJIkB{*ItRl95 hB3&ki@W&$VVT4E;Mlf!c&gWP_;XoV`h?`n!{{qzO`_2FW delta 1332 zcmZ8hZERCz6wZ0>-G*bdRS0fm)2bV6y1~7r?YfDiiqjG#n}ST^kcm=cW?82RAaTR^ z!3YVi^d=m^FSej01J`D0`f4%}S)xCjOGEUB#2@n`^CPlce)tCy^?mPcar*at-t(Mu zp7WeDJ?s7WNAJt8Q5NHs)XeEhT(+W_b)3IQ4~l#ho+B$irE{hdck#YajIn>W)+V-B zI%TUfe)i8O-VLZ;!Rk%;ZQJ|R0pTqB#v7(d>i((>OkEtD<~D;DSYdYR6+y{mr1^tDGjr3%%%0{S8(Wm z@T6>DxoRLL_TCGfIKLjHJW+|;6|=)IdAxyM7w0yhj@bJPEktvmH=JO8`zIPP;^IGae?sb(13AiUw7cO6%cMpVK4a*$zD9R3-)5>dsxE)$V*3 zZ^4K{!*YB@luwmudve?GimsWaDUzM2BIk{bX6Rz>37jOhA47>qb>e1{Wc_Sss6xy? zi812n87d$t$tr7zi9er0mkh~J37>A1t#>Ez2m9Y6i>JRM4_EcV6yu+0ONf0o-NMP6 zv?#(6mYE%&PO@(qdb!~WEfF)j;iHm3s~HUZi(9_^&nulaiu-#IckE!e=-vuCU2tMA zE_1X;YA&m8;FUSdN#C{eraoNJL(2S4x(}A(8CRNj`cbc|eUaAozi_>hFdbuKh;$L! zhdv!4Qy7B?Q7UY3;(O^h&#zR@O#}Fg`#zP!3{A*>JuenUEi*1EeEUrfR2)>6@DIqz z1qNkNa^5K?IeTYmF`qngU6({!yHjLd#XMB+A$QsM{Lvz>Z~q`C9+l~94`Yt|?4pgF zAGzg}<=O2LO&)K#G+R#rzo2*G8yi8D){xipt8B)nr6Q zSuZtVAtZ&BMYb2aSasFSBruA)2u9tsAPJ%yuR7cQn%x|J=Q+=L;XKb7`({t3?4e6E ziYJTYKp~cq=!?-oTyV#vNk<`^#JgV7Jbvhcn`3#VXZ$OI4eaYBizJH?#SAVdxmALG znh{)d(=(+>%!NI(Mb@pbajX={Sx!!@fJG+CFlmzF3RDu;PLhp3m!X_rJ7DEh9m0IC z(bOzUDzK6y>P7?Qm_ueYFl!A(u$_HH(74YJPiB&`F0ICDO(HdldCi!bT3)TDI@e<~ z`xfb~K^4i#b?}nGX%CJY%=Yi<#z-Bej5EhZlur9Ro6u$vy&hXh96mG=zv@@H6x72< zGPDId{u8|0F!)bs%w^1v2WhS}?L<(McYd^yc$*O=gM+*ABFn8LiM?o<=Hz}nAQ|_o zWF>hJ#Rg~dzJ3_(#-8&#@g-+t-!c3&&~pk_DGI`+37^0r;;Jxd^5!&-XcFwgStazS zHokVlOmegf-73S2n4jef#Q7=G`Aj(XAKu?+Z_UN{<1(H?)Y?P5IfAr-fvfm!;JJm+ zdF?e^G4_=@Y?A21zC20XMhVIA-Aw-&$n=qp;XGwnwf1%p9}IjnM|JJIkB{*ItRl95 hB3&ki@W&$VVT4E;Mlf!c&gWP_;XoV`h?`n!{{qzO`_2FW delta 1332 zcmZ8hZERCz6wZ0>-G*bdRS0fm)2bV6y1~7r?YfDiiqjG#n}ST^kcm=cW?82RAaTR^ z!3YVi^d=m^FSej01J`D0`f4%}S)xCjOGEUB#2@n`^CPlce)tCy^?mPcar*at-t(Mu zp7WeDJ?s7WNAJt8Q5NHs)XeEhT(+W_b)3IQ4~l#ho+B$irE{hdck#YajIn>W)+V-B zI%TUfe)i8O-VLZ;!Rk%;ZQJ|R0pTqB#v7(d>i((>OkEtD<~D;DSYdYR6+y{mr1^tDGjr3%%%0{S8(Wm z@T6>DxoRLL_TCGfIKLjHJW+|;6|=)IdAxyM7w0yhj@bJPEktvmH=JO8`zIPP;^IGae?sb(13AiUw7cO6%cMpVK4a*$zD9R3-)5>dsxE)$V*3 zZ^4K{!*YB@luwmudve?GimsWaDUzM2BIk{bX6Rz>37jOhA47>qb>e1{Wc_Sss6xy? zi812n87d$t$tr7zi9er0mkh~J37>A1t#>Ez2m9Y6i>JRM4_EcV6yu+0ONf0o-NMP6 zv?#(6mYE%&PO@(qdb!~WEfF)j;iHm3s~HUZi(9_^&nulaiu-#IckE!e=-vuCU2tMA zE_1X;YA&m8;FUSdN#C{eraoNJL(2S4x(}A(8CRNj`cbc|eUaAozi_>hFdbuKh;$L! zhdv!4Qy7B?Q7UY3;(O^h&#zR@O#}Fg`#zP!3{A*>JuenUEi*1EeEUrfR2)>6@DIqz z1qNkNa^5K?IeTYmF`qngU6({!yHjLd#XMB+A$QsM{Lvz>Z~q`C9+l~94`Yt|?4pgF zAGzg}<=O2LO&)xCu^21;UNk@->=t1hCONnsRr5lB}pNP_6btG?|V&2A3A?>WzTK6sw<_O@d@=7?OU zVLV`=Lzzi-YxmSuFnh`t{ z_f2V%^x)uZk#!sFoGe3TmXp&fV3o0QOcsc{5>>=&C&|uV%2C0uov`sl9is7&*Ok9s zmQ-RTNy3W;GMFP46`Hq4V%W(67c}k;!k0@^)}=LAtx2p_F|T={k}GOda>)h^8-ZQ5 zs3tkL9)1#ovp$?LnTx)wFNW$cWxjK6LfN#>w;3%~(d)6D#2G*%@v9!y&AfU9Ncy*7 z*MEY42U7opt;7QYiw(~5^Aqd`@yWRAgY za=z}nCve0(vm=DBhK&QK@zX@#dDz4ihDQ@Vi{r%AQPSki1)S6*+>T31=u~5T>wtyi zR69CUeb+EQ&sT{Z6QuLSsPQ{|j7Rn~8x{VzfhQ34>?Gb2L)OHmTlj6_<%Q6B-5uOC z&s93?lJ3UgLP_68Daqi2-2UjzZIMml3guWW_AZ4_CO(>@b}s3|=aF8lA}$&yUB>$H Y$12`IL`WKjFlv#|Gb|u!8bRBKzbw4@<^TWy delta 1340 zcmZ8hZA_b06wZ120t($b3`W5~tXj5_G3nd2rI5K*VH?fDAYl#(&Q+ZwLKceCkG1B(b_&?24V7J8XykFhqqLFOWU|wL$;EdFU8+v8MzL zY!;x1yUStm&LimH&`La|GReEt%QcH%?D^7s_Sn=UrdHvugZzqmC6BJf$9B{z=kybj z|MfL^j3~%QE0!S1LR5IrOvc)JUqBaBIR$*^KAPZY3pMe3UR;xCFqnhRR?`=v)rSLy z)JRuL2XU2)f1}sM?{%mlviR=fSi$-^c^kVqGEWVneI3F|3$G_rOu_|9#+i&%H`b$1 z!T$fjbDZkMLmUZEquBQ(4C3T^65|^6MLj3R+Rd^e!6svNJ61bmAm&`WfVj@pe3@ zfIdzq$SD?|!vt~Y94#S{4L&~osT}X0&*NE{lb}34TP^<|iQ?Dstu|k~MJAW+fh87Q z4u|f+sbgqFAjq<-cB^8&N?UEE>D9TN}fZLH9Z7 ztn$QWHuvCL4s}cACGRR;F^fB#%BL3I(u)Pdul7Lq{IEotSgUlZ4^@U*9cgpd-Ygw1 z4$x8d9415f`_XH_ZwXHfezGGQJRH3(CuaUcg}i0}e{t_ea;W}k`DJr|cH}(PLCswB zGc6NhP}#yYAgAYzNlJ3&;p8zsT~p>8%A0#oo5;=Gs*JnQ90y|Ja9jpynFO3#bpTMF6f$T~|<8sfmUq5>v zF+y#2E%ke77y9|NGq~xnJh}0%FEPTC_h1=cI*~aeFX}TQ8Cls6%Y2hBl%UNXOoheh q2lzW5mQRdLqE=ofd0X@WF)!ltJOneBhuf!dj?)#iS1in+C;1N%9oJs~ diff --git a/pkg/front_end/testcases/regress/utf_16_le_content.crash_dart.strong.transformed.expect b/pkg/front_end/testcases/regress/utf_16_le_content.crash_dart.strong.transformed.expect index 5a6ea7d0c92ba82cd6cf5602a783d31d38acce41..e24b5ed6565895be9129228407845c8f20e56df9 100644 GIT binary patch delta 743 zcmY+CT}abW7{+;@{kLWP=PbfSDa{y(AB8K>K#G+R#rzo2*G8yi8D){xipt8B)nr6Q zSuZtVAtZ&BMYb2aSasFSBruA)2u9tsAPJ%yuR7cQn%x|J=Q+=L;XKb7`({t3?4e6E ziYJTYKp~cq=!?-oTyV#vNk<`^#JgV7Jbvhcn`3#VXZ$OI4eaYBizJH?#SAVdxmALG znh{)d(=(+>%!NI(Mb@pbajX={Sx!!@fJG+CFlmzF3RDu;PLhp3m!X_rJ7DEh9m0IC z(bOzUDzK6y>P7?Qm_ueYFl!A(u$_HH(74YJPiB&`F0ICDO(HdldCi!bT3)TDI@e<~ z`xfb~K^4i#b?}nGX%CJY%=Yi<#z-Bej5EhZlur9Ro6u$vy&hXh96mG=zv@@H6x72< zGPDId{u8|0F!)bs%w^1v2WhS}?L<(McYd^yc$*O=gM+*ABFn8LiM?o<=Hz}nAQ|_o zWF>hJ#Rg~dzJ3_(#-8&#@g-+t-!c3&&~pk_DGI`+37^0r;;Jxd^5!&-XcFwgStazS zHokVlOmegf-73S2n4jef#Q7=G`Aj(XAKu?+Z_UN{<1(H?)Y?P5IfAr-fvfm!;JJm+ zdF?e^G4_=@Y?A21zC20XMhVIA-Aw-&$n=qp;XGwnwf1%p9}IjnM|JJIkB{*ItRl95 hB3&ki@W&$VVT4E;Mlf!c&gWP_;XoV`h?`n!{{qzO`_2FW delta 1332 zcmZ8hZERCz6wZ0>-G*bdRS0fm)2bV6y1~7r?YfDiiqjG#n}ST^kcm=cW?82RAaTR^ z!3YVi^d=m^FSej01J`D0`f4%}S)xCjOGEUB#2@n`^CPlce)tCy^?mPcar*at-t(Mu zp7WeDJ?s7WNAJt8Q5NHs)XeEhT(+W_b)3IQ4~l#ho+B$irE{hdck#YajIn>W)+V-B zI%TUfe)i8O-VLZ;!Rk%;ZQJ|R0pTqB#v7(d>i((>OkEtD<~D;DSYdYR6+y{mr1^tDGjr3%%%0{S8(Wm z@T6>DxoRLL_TCGfIKLjHJW+|;6|=)IdAxyM7w0yhj@bJPEktvmH=JO8`zIPP;^IGae?sb(13AiUw7cO6%cMpVK4a*$zD9R3-)5>dsxE)$V*3 zZ^4K{!*YB@luwmudve?GimsWaDUzM2BIk{bX6Rz>37jOhA47>qb>e1{Wc_Sss6xy? zi812n87d$t$tr7zi9er0mkh~J37>A1t#>Ez2m9Y6i>JRM4_EcV6yu+0ONf0o-NMP6 zv?#(6mYE%&PO@(qdb!~WEfF)j;iHm3s~HUZi(9_^&nulaiu-#IckE!e=-vuCU2tMA zE_1X;YA&m8;FUSdN#C{eraoNJL(2S4x(}A(8CRNj`cbc|eUaAozi_>hFdbuKh;$L! zhdv!4Qy7B?Q7UY3;(O^h&#zR@O#}Fg`#zP!3{A*>JuenUEi*1EeEUrfR2)>6@DIqz z1qNkNa^5K?IeTYmF`qngU6({!yHjLd#XMB+A$QsM{Lvz>Z~q`C9+l~94`Yt|?4pgF zAGzg}<=O2LO&) 0; // ^^^^^^ @@ -115,23 +113,18 @@ extension E5 on int { static int get property => 1; // ^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Conflicts with setter 'property'. static void set property(int value) {} // ^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Conflicts with member 'property'. static int get property2 => 1; // ^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Conflicts with setter 'property2'. static void set property3(int x) {} // ^^^^^^^^^ // [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Conflicts with member 'property3'. static int field = 3; // ^^^^^ // [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Conflicts with setter 'field'. static int field2 = 3; // ^^^^^^ // [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE @@ -142,19 +135,15 @@ extension E5 on int { int get property => 1; // ^ // [cfe] 'property' is already declared in this scope. - // ^ - // [cfe] Conflicts with setter 'property'. void set property(int value) {} // ^ // [cfe] 'property' is already declared in this scope. - // ^ - // [cfe] Conflicts with member 'property'. void set property2(int value) {} // ^ - // [cfe] Conflicts with member 'property2'. + // [cfe] Instance property 'property2' conflicts with static property of the same name. int get property3 => 1; // ^ - // [cfe] Conflicts with setter 'property3'. + // [cfe] Instance property 'property3' conflicts with static property of the same name. void set field(int value) {} // ^ // [cfe] Conflicts with the implicit setter of the field 'field'. @@ -175,12 +164,10 @@ extension E6 on int { // Check a static method colliding with a static setter. extension E7 on int { static int method() => 0; - // ^ - // [cfe] Conflicts with setter 'method'. static void set method(int value) {} // ^^^^^^ // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] Conflicts with member 'method'. + // [cfe] The setter conflicts with declaration 'method'. } // Check a static method colliding with a static field. @@ -204,12 +191,10 @@ extension E9 on int { // Check an instance method colliding with an instance setter. extension E10 on int { int method() => 0; - // ^ - // [cfe] Conflicts with setter 'method'. void set method(int value) {} // ^^^^^^ // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] Conflicts with member 'method'. + // [cfe] The setter conflicts with declaration 'method'. } // Check a static method colliding with an instance getter. @@ -227,10 +212,9 @@ extension E12 on int { static int method() => 0; // ^^^^^^ // [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Conflicts with setter 'method'. void set method(int value) {} // ^ - // [cfe] Conflicts with member 'method'. + // [cfe] The setter conflicts with declaration 'method'. } // Check an instance method colliding with a static getter. @@ -245,12 +229,10 @@ extension E13 on int { // Check an instance method colliding with a static setter. extension E14 on int { int method() => 0; - // ^ - // [cfe] Conflicts with setter 'method'. static void set method(int value) {} // ^^^^^^ // [analyzer] COMPILE_TIME_ERROR.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE - // [cfe] Conflicts with member 'method'. + // [cfe] The setter conflicts with declaration 'method'. } // Check an instance method colliding with a static field. diff --git a/tests/language/field/field1_test.dart b/tests/language/field/field1_test.dart index f32b5ca2dbf0..2ca61eaee176 100644 --- a/tests/language/field/field1_test.dart +++ b/tests/language/field/field1_test.dart @@ -7,8 +7,6 @@ class C { var a; - // ^ - // [cfe] Conflicts with setter 'a'. get a { // ^ diff --git a/tests/language/field/field2_test.dart b/tests/language/field/field2_test.dart index 0d0f75edb00a..cd4340fcfda1 100644 --- a/tests/language/field/field2_test.dart +++ b/tests/language/field/field2_test.dart @@ -11,8 +11,6 @@ class C { } set a(int val) { - // ^ - // [cfe] Conflicts with the implicit setter of the field 'a'. var x = val; } @@ -28,7 +26,6 @@ class C { // ^ // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION // [cfe] 'a' is already declared in this scope. - // [cfe] Conflicts with setter 'a'. } class Field2Test { diff --git a/tests/language/regress/regress33235_01_test.dart b/tests/language/regress/regress33235_01_test.dart index a0a256ba1c36..83c4c0f99b0d 100644 --- a/tests/language/regress/regress33235_01_test.dart +++ b/tests/language/regress/regress33235_01_test.dart @@ -8,14 +8,12 @@ class C { C.n() {} -//^ -// [cfe] Conflicts with member 'n'. // ^ // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER static int get n { // ^ - // [cfe] Conflicts with constructor 'C.n'. + // [cfe] The member conflicts with constructor 'C.n'. return 42; } } diff --git a/tests/language/regress/regress33235_02_test.dart b/tests/language/regress/regress33235_02_test.dart index c0f5cfc6bde0..9f43cd847b08 100644 --- a/tests/language/regress/regress33235_02_test.dart +++ b/tests/language/regress/regress33235_02_test.dart @@ -8,14 +8,12 @@ class C { C.n() {} -//^ -// [cfe] Conflicts with member 'n'. // ^ // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER static int n() { // ^ - // [cfe] Conflicts with constructor 'C.n'. + // [cfe] The member conflicts with constructor 'C.n'. return 42; } } diff --git a/tests/language/regress/regress33235_03_test.dart b/tests/language/regress/regress33235_03_test.dart index 029a0ac935f8..1e2c32a75a63 100644 --- a/tests/language/regress/regress33235_03_test.dart +++ b/tests/language/regress/regress33235_03_test.dart @@ -8,14 +8,12 @@ class C { C.n() {} -//^ -// [cfe] Conflicts with setter 'n'. // ^ // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_CONSTRUCTOR_AND_STATIC_MEMBER static set n(int x) {} // ^ - // [cfe] Conflicts with constructor 'n'. + // [cfe] The member conflicts with constructor 'C.n'. } main() { diff --git a/tests/language/regress/regress33235_07_test.dart b/tests/language/regress/regress33235_07_test.dart index 5eeed14af1a4..893c2461ea5e 100644 --- a/tests/language/regress/regress33235_07_test.dart +++ b/tests/language/regress/regress33235_07_test.dart @@ -31,6 +31,8 @@ class C { // [cfe] This static member conflicts with an instance member. void set n(int i) {} + // ^ + // [cfe] Instance property 'n' conflicts with static property of the same name. } main() { diff --git a/tests/language/regress/regress33235_10_test.dart b/tests/language/regress/regress33235_10_test.dart index 6025433635bc..8078c0fbf3f9 100644 --- a/tests/language/regress/regress33235_10_test.dart +++ b/tests/language/regress/regress33235_10_test.dart @@ -31,6 +31,8 @@ class C { // [cfe] This static member conflicts with an instance member. void set n(int i) {} + // ^ + // [cfe] The setter conflicts with declaration 'n'. } main() { diff --git a/tests/language/regress/regress33235_11_test.dart b/tests/language/regress/regress33235_11_test.dart index 1ee5437259a1..8e7843cdff5c 100644 --- a/tests/language/regress/regress33235_11_test.dart +++ b/tests/language/regress/regress33235_11_test.dart @@ -12,7 +12,7 @@ class C { static int n() => 42; // ^ // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] 'n' is already declared in this scope. + // [cfe] The declaration conflicts with setter 'n'. } main() { diff --git a/tests/language/regress/regress33235_12_test.dart b/tests/language/regress/regress33235_12_test.dart index eede6d8ba7a6..aa74dee6c5ba 100644 --- a/tests/language/regress/regress33235_12_test.dart +++ b/tests/language/regress/regress33235_12_test.dart @@ -31,6 +31,8 @@ class C { // [cfe] This static member conflicts with an instance member. int get n => 42; + // ^ + // [cfe] Instance property 'n' conflicts with static property of the same name. } main() { diff --git a/tests/language/regress/regress33235_13_test.dart b/tests/language/regress/regress33235_13_test.dart index 6451c3decdaf..1e317256343c 100644 --- a/tests/language/regress/regress33235_13_test.dart +++ b/tests/language/regress/regress33235_13_test.dart @@ -31,6 +31,8 @@ class C { // [cfe] This static member conflicts with an instance member. int n() => 42; + // ^ + // [cfe] The declaration conflicts with setter 'n'. } main() { diff --git a/tests/language/regress/regress33235_16_test.dart b/tests/language/regress/regress33235_16_test.dart index a130a1d2a429..a5abf1a2ddf3 100644 --- a/tests/language/regress/regress33235_16_test.dart +++ b/tests/language/regress/regress33235_16_test.dart @@ -30,7 +30,7 @@ class C { int n() => 43; // ^ // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] 'n' is already declared in this scope. + // [cfe] The declaration conflicts with setter 'n'. } main() { diff --git a/tests/language/setter/setter4_test.dart b/tests/language/setter/setter4_test.dart index 54dc5ed7dc84..2d5a9bb3b542 100644 --- a/tests/language/setter/setter4_test.dart +++ b/tests/language/setter/setter4_test.dart @@ -12,7 +12,7 @@ class A { void set a(var val) { // ^ // [analyzer] COMPILE_TIME_ERROR.DUPLICATE_DEFINITION - // [cfe] 'a' is already declared in this scope. + // [cfe] The setter conflicts with declaration 'a'. int i = val; } } diff --git a/tests/language/unsorted/bad_override_test.dart b/tests/language/unsorted/bad_override_test.dart index 07400d2bebb7..fb4368a7336c 100644 --- a/tests/language/unsorted/bad_override_test.dart +++ b/tests/language/unsorted/bad_override_test.dart @@ -8,6 +8,7 @@ class Fisk { set fisk(x) {} // ^^^^ // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE + // [cfe] Static property 'fisk' conflicts with instance property of the same name. // [cfe] This static member conflicts with an instance member. static @@ -16,6 +17,8 @@ class Fisk { // [analyzer] COMPILE_TIME_ERROR.CONFLICTING_STATIC_AND_INSTANCE // [cfe] This static member conflicts with an instance member. set hest(x) {} + // ^ + // [cfe] Instance property 'hest' conflicts with static property of the same name. foo() {} var field;