From 81b669dc45e3b040b6080c95688ba2f462b47a84 Mon Sep 17 00:00:00 2001 From: Johnni Winther Date: Thu, 16 Jan 2025 01:17:42 -0800 Subject: [PATCH] [cfe] Create enum elements through SourcePropertyBuilder TEST=existing Change-Id: I94ffff0ca5d891b43e0bc7b64d78eb0c03e3dd12 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/404103 Reviewed-by: Alexander Markov Commit-Queue: Johnni Winther Reviewed-by: Chloe Stefantsova --- .../testcases/literals.dart.expect | 20 +- pkg/front_end/lib/src/base/scope.dart | 4 + .../lib/src/builder/member_builder.dart | 3 + .../dill/dill_extension_member_builder.dart | 24 + .../dill_extension_type_member_builder.dart | 32 ++ .../lib/src/dill/dill_member_builder.dart | 28 + pkg/front_end/lib/src/fragment/enum.dart | 8 +- .../lib/src/fragment/enum_element.dart | 543 ++++++++++++++++++ .../lib/src/fragment/extension_type.dart | 7 + pkg/front_end/lib/src/fragment/field.dart | 111 ++-- .../lib/src/fragment/field/class_member.dart | 4 +- pkg/front_end/lib/src/fragment/fragment.dart | 5 + pkg/front_end/lib/src/fragment/util.dart | 193 +++++++ .../lib/src/kernel/implicit_field_type.dart | 97 +++- .../lib/src/source/builder_factory.dart | 9 +- .../lib/src/source/outline_builder.dart | 26 +- .../src/source/source_builder_factory.dart | 22 +- .../source/source_constructor_builder.dart | 8 + .../lib/src/source/source_enum_builder.dart | 311 +--------- .../src/source/source_factory_builder.dart | 4 + .../lib/src/source/source_field_builder.dart | 12 +- .../lib/src/source/source_method_builder.dart | 3 + .../src/source/source_property_builder.dart | 11 +- .../src/source/synthetic_method_builder.dart | 4 + .../source/type_parameter_scope_builder.dart | 60 +- pkg/front_end/lib/src/source/value_kinds.dart | 1 - .../test/coverage_suite_expected.dart | 29 +- .../data/tests/targets.dart.expect | 2 +- .../outside_library/main.dart.strong.expect | 2 +- .../main.dart.strong.modular.expect | 2 +- .../main.dart.strong.outline.expect | 4 +- .../main.dart.strong.transformed.expect | 2 +- .../outside_library/main.dart.strong.expect | 2 +- .../main.dart.strong.modular.expect | 2 +- .../main.dart.strong.outline.expect | 4 +- .../main.dart.strong.transformed.expect | 2 +- .../final/typedef/main.dart.strong.expect | 6 +- .../typedef/main.dart.strong.modular.expect | 6 +- .../typedef/main.dart.strong.outline.expect | 12 +- .../main.dart.strong.transformed.expect | 6 +- .../invalid_enum_modifiers.dart.strong.expect | 8 +- ..._enum_modifiers.dart.strong.modular.expect | 8 +- ..._enum_modifiers.dart.strong.outline.expect | 16 +- ...m_modifiers.dart.strong.transformed.expect | 8 +- ...t_in_identifier_A02_t02.dart.strong.expect | 2 +- ...ntifier_A02_t02.dart.strong.modular.expect | 2 +- ...ntifier_A02_t02.dart.strong.outline.expect | 4 +- ...ier_A02_t02.dart.strong.transformed.expect | 2 +- .../enum_from_environment.dart.strong.expect | 24 +- ...rom_environment.dart.strong.modular.expect | 24 +- ...rom_environment.dart.strong.outline.expect | 10 +- ...environment.dart.strong.transformed.expect | 26 +- .../enum_from_environment.dart.weak.expect | 24 +- ...m_environment.dart.weak.transformed.expect | 26 +- .../dart2js/issue51823.dart.strong.expect | 2 +- .../issue51823.dart.strong.modular.expect | 2 +- .../issue51823.dart.strong.outline.expect | 4 +- .../issue51823.dart.strong.transformed.expect | 2 +- .../dart2js/issue51823.dart.weak.expect | 2 +- .../issue51823.dart.weak.transformed.expect | 2 +- .../issue56681/main.dart.strong.expect | 2 +- .../main.dart.strong.outline.expect | 4 +- .../main.dart.strong.transformed.expect | 2 +- .../abstract_members.dart.strong.expect | 14 +- ...bstract_members.dart.strong.modular.expect | 14 +- ...bstract_members.dart.strong.outline.expect | 28 +- ...act_members.dart.strong.transformed.expect | 14 +- .../conflicting_elements.dart.strong.expect | 87 +-- ...icting_elements.dart.strong.modular.expect | 87 +-- ...icting_elements.dart.strong.outline.expect | 61 +- ...ng_elements.dart.strong.transformed.expect | 87 +-- .../constructor_calls.dart.strong.expect | 6 +- ...nstructor_calls.dart.strong.modular.expect | 6 +- ...nstructor_calls.dart.strong.outline.expect | 6 +- ...uctor_calls.dart.strong.transformed.expect | 6 +- .../constructor_not_found.dart.strong.expect | 8 +- ...uctor_not_found.dart.strong.modular.expect | 8 +- ...uctor_not_found.dart.strong.outline.expect | 4 +- ...r_not_found.dart.strong.transformed.expect | 8 +- .../testcases/enhanced_enums/cyclic.dart | 11 + .../enhanced_enums/cyclic.dart.strong.expect | 33 ++ .../cyclic.dart.strong.modular.expect | 33 ++ .../cyclic.dart.strong.outline.expect | 23 + .../cyclic.dart.strong.transformed.expect | 33 ++ .../cyclic.dart.textual_outline.expect | 7 + ...yclic.dart.textual_outline_modelled.expect | 7 + .../declared_equals.dart.strong.expect | 6 +- ...declared_equals.dart.strong.modular.expect | 6 +- ...declared_equals.dart.strong.outline.expect | 12 +- ...ared_equals.dart.strong.transformed.expect | 6 +- .../declared_hashcode.dart.strong.expect | 28 +- ...clared_hashcode.dart.strong.modular.expect | 28 +- ...clared_hashcode.dart.strong.outline.expect | 56 +- .../declared_index.dart.strong.expect | 28 +- .../declared_index.dart.strong.modular.expect | 28 +- .../declared_index.dart.strong.outline.expect | 56 +- .../declared_values.dart.strong.expect | 14 +- ...declared_values.dart.strong.modular.expect | 14 +- ...declared_values.dart.strong.outline.expect | 28 +- ...ared_values.dart.strong.transformed.expect | 14 +- ...ies_with_type_arguments.dart.strong.expect | 2 +- ..._type_arguments.dart.strong.modular.expect | 2 +- ..._type_arguments.dart.strong.outline.expect | 4 +- ...e_arguments.dart.strong.transformed.expect | 2 +- .../enum_as_supertype.dart.strong.expect | 8 +- ...um_as_supertype.dart.strong.modular.expect | 8 +- ...um_as_supertype.dart.strong.outline.expect | 16 +- ...s_supertype.dart.strong.transformed.expect | 8 +- .../enum_with_mixin.dart.strong.expect | 4 +- ...enum_with_mixin.dart.strong.modular.expect | 4 +- ...enum_with_mixin.dart.strong.outline.expect | 8 +- ..._with_mixin.dart.strong.transformed.expect | 4 +- .../enhanced_enums/external_constructor.dart | 10 + .../external_constructor.dart.strong.expect | 34 ++ ...nal_constructor.dart.strong.modular.expect | 34 ++ ...nal_constructor.dart.strong.outline.expect | 24 + ...constructor.dart.strong.transformed.expect | 34 ++ ...al_constructor.dart.textual_outline.expect | 1 + .../generic_enum_switch.dart.strong.expect | 2 +- ...ric_enum_switch.dart.strong.modular.expect | 2 +- ...ric_enum_switch.dart.strong.outline.expect | 4 +- ...enum_switch.dart.strong.transformed.expect | 2 +- ..._constructor_parameters.dart.strong.expect | 6 +- ...ctor_parameters.dart.strong.modular.expect | 6 +- ...ctor_parameters.dart.strong.outline.expect | 12 +- ..._parameters.dart.strong.transformed.expect | 6 +- ...ited_restricted_members.dart.strong.expect | 20 +- ...tricted_members.dart.strong.modular.expect | 20 +- ...tricted_members.dart.strong.outline.expect | 40 +- ...ted_members.dart.strong.transformed.expect | 20 +- ...ated_generic_enum_types.dart.strong.expect | 4 +- ...eric_enum_types.dart.strong.modular.expect | 4 +- ...eric_enum_types.dart.strong.outline.expect | 6 +- ..._enum_types.dart.strong.transformed.expect | 4 +- .../issue48084.dart.strong.expect | 4 +- .../issue48084.dart.strong.modular.expect | 4 +- .../issue48084.dart.strong.outline.expect | 6 +- .../issue48084.dart.strong.transformed.expect | 4 +- .../issue48181.dart.strong.expect | 8 +- .../issue48181.dart.strong.modular.expect | 8 +- .../issue48181.dart.strong.outline.expect | 6 +- .../issue48181.dart.strong.transformed.expect | 8 +- .../issue48232.dart.strong.expect | 2 +- .../issue48232.dart.strong.modular.expect | 2 +- .../issue48232.dart.strong.outline.expect | 4 +- .../issue48232.dart.strong.transformed.expect | 2 +- .../issue48303.dart.strong.expect | 2 +- .../issue48303.dart.strong.modular.expect | 2 +- .../issue48303.dart.strong.outline.expect | 4 +- .../issue48303.dart.strong.transformed.expect | 2 +- .../issue49236.dart.strong.expect | 14 +- .../issue49236.dart.strong.modular.expect | 14 +- .../issue49236.dart.strong.outline.expect | 28 +- .../issue49236.dart.strong.transformed.expect | 14 +- .../issue49429.dart.strong.expect | 2 +- .../issue49429.dart.strong.modular.expect | 2 +- .../issue49429.dart.strong.outline.expect | 4 +- .../issue49429.dart.strong.transformed.expect | 2 +- .../issue51189.dart.strong.expect | 2 +- .../issue51189.dart.strong.modular.expect | 2 +- .../issue51189.dart.strong.outline.expect | 4 +- .../issue51189.dart.strong.transformed.expect | 2 +- .../malformed_constructors.dart.strong.expect | 10 +- ...ed_constructors.dart.strong.modular.expect | 10 +- ...ed_constructors.dart.strong.outline.expect | 4 +- ...onstructors.dart.strong.transformed.expect | 10 +- ...member_values_conflicts.dart.strong.expect | 2 +- ...alues_conflicts.dart.strong.modular.expect | 2 +- ...alues_conflicts.dart.strong.outline.expect | 4 +- ...s_conflicts.dart.strong.transformed.expect | 2 +- .../enhanced_enums/members.dart.strong.expect | 8 +- .../members.dart.strong.modular.expect | 8 +- .../members.dart.strong.outline.expect | 12 +- .../members.dart.strong.transformed.expect | 8 +- .../missed_checks.dart.strong.expect | 8 +- .../missed_checks.dart.strong.modular.expect | 8 +- .../missed_checks.dart.strong.outline.expect | 16 +- ...ssed_checks.dart.strong.transformed.expect | 8 +- .../named_arguments.dart.strong.expect | 14 +- ...named_arguments.dart.strong.modular.expect | 14 +- ...named_arguments.dart.strong.outline.expect | 20 +- ...d_arguments.dart.strong.transformed.expect | 14 +- ...redirecting_constructor.dart.strong.expect | 4 +- ...ing_constructor.dart.strong.modular.expect | 4 +- ...ing_constructor.dart.strong.outline.expect | 6 +- ...constructor.dart.strong.transformed.expect | 4 +- ..._with_no_type_arguments.dart.strong.expect | 2 +- ..._type_arguments.dart.strong.modular.expect | 2 +- ..._type_arguments.dart.strong.outline.expect | 4 +- ...e_arguments.dart.strong.transformed.expect | 2 +- .../recovery_in_elements.dart.strong.expect | 2 +- ...ery_in_elements.dart.strong.modular.expect | 2 +- ...ery_in_elements.dart.strong.outline.expect | 4 +- ...in_elements.dart.strong.transformed.expect | 2 +- ...edirecting_initializers.dart.strong.expect | 12 +- ...ng_initializers.dart.strong.modular.expect | 12 +- ...ng_initializers.dart.strong.outline.expect | 12 +- ...nitializers.dart.strong.transformed.expect | 12 +- ...ng_to_unrelated_factory.dart.strong.expect | 2 +- ...related_factory.dart.strong.modular.expect | 2 +- ...related_factory.dart.strong.outline.expect | 4 +- ...ted_factory.dart.strong.transformed.expect | 2 +- ...etter_getter_type_check.dart.strong.expect | 2 +- ...tter_type_check.dart.strong.modular.expect | 2 +- ...tter_type_check.dart.strong.outline.expect | 4 +- ..._type_check.dart.strong.transformed.expect | 2 +- .../simple_fields.dart.strong.expect | 10 +- .../simple_fields.dart.strong.modular.expect | 10 +- .../simple_fields.dart.strong.outline.expect | 14 +- ...mple_fields.dart.strong.transformed.expect | 10 +- .../simple_interfaces.dart.strong.expect | 8 +- ...mple_interfaces.dart.strong.modular.expect | 8 +- ...mple_interfaces.dart.strong.outline.expect | 16 +- ..._interfaces.dart.strong.transformed.expect | 8 +- .../simple_mixins.dart.strong.expect | 6 +- .../simple_mixins.dart.strong.modular.expect | 6 +- .../simple_mixins.dart.strong.outline.expect | 12 +- ...mple_mixins.dart.strong.transformed.expect | 6 +- .../malformed_constructors.dart.strong.expect | 10 +- ...ed_constructors.dart.strong.modular.expect | 10 +- ...ed_constructors.dart.strong.outline.expect | 4 +- ...onstructors.dart.strong.transformed.expect | 10 +- ...esolved_before_checking.dart.strong.expect | 2 +- ...before_checking.dart.strong.modular.expect | 2 +- ...before_checking.dart.strong.outline.expect | 4 +- ...re_checking.dart.strong.transformed.expect | 2 +- ...thetic_enum_constructor.dart.strong.expect | 6 +- ...num_constructor.dart.strong.modular.expect | 6 +- ...num_constructor.dart.strong.outline.expect | 12 +- ...constructor.dart.strong.transformed.expect | 6 +- .../issue53840.dart.strong.expect | 2 +- .../issue53840.dart.strong.modular.expect | 2 +- .../issue53840.dart.strong.outline.expect | 4 +- .../issue53840.dart.strong.transformed.expect | 2 +- .../issue54097.dart.strong.expect | 4 +- .../issue54097.dart.strong.modular.expect | 4 +- .../issue54097.dart.strong.outline.expect | 8 +- .../issue54097.dart.strong.transformed.expect | 4 +- ...cting_factory_from_enum.dart.strong.expect | 2 +- ...ctory_from_enum.dart.strong.modular.expect | 2 +- ...ctory_from_enum.dart.strong.outline.expect | 4 +- ...y_from_enum.dart.strong.transformed.expect | 2 +- ...notation_on_enum_values.dart.strong.expect | 38 +- ..._on_enum_values.dart.strong.modular.expect | 38 +- ..._on_enum_values.dart.strong.outline.expect | 4 +- ...enum_values.dart.strong.transformed.expect | 38 +- .../general/bounds_enums.dart.strong.expect | 6 +- .../bounds_enums.dart.strong.modular.expect | 6 +- .../bounds_enums.dart.strong.outline.expect | 12 +- ...ounds_enums.dart.strong.transformed.expect | 6 +- .../bounds_supertypes.dart.strong.expect | 64 +-- ...unds_supertypes.dart.strong.modular.expect | 64 +-- ...unds_supertypes.dart.strong.outline.expect | 128 ++--- ..._supertypes.dart.strong.transformed.expect | 64 +-- .../bounds_type_parameters.dart.strong.expect | 2 +- ...type_parameters.dart.strong.modular.expect | 2 +- ...type_parameters.dart.strong.outline.expect | 4 +- ..._parameters.dart.strong.transformed.expect | 2 +- ...duplicated_declarations.dart.strong.expect | 41 +- ...ed_declarations.dart.strong.modular.expect | 41 +- ...ed_declarations.dart.strong.outline.expect | 57 +- ...eclarations.dart.strong.transformed.expect | 41 +- .../enum_names_from_core.dart.strong.expect | 2 +- ...names_from_core.dart.strong.modular.expect | 2 +- ...names_from_core.dart.strong.outline.expect | 4 +- ...s_from_core.dart.strong.transformed.expect | 2 +- .../enum_super_constructor.dart.strong.expect | 8 +- ...per_constructor.dart.strong.modular.expect | 8 +- ...per_constructor.dart.strong.outline.expect | 6 +- ...constructor.dart.strong.transformed.expect | 8 +- .../class_header.dart.strong.expect | 52 +- .../class_header.dart.strong.modular.expect | 52 +- .../class_header.dart.strong.outline.expect | 104 ++-- ...lass_header.dart.strong.transformed.expect | 52 +- ...extends_implements_void.dart.strong.expect | 4 +- ...implements_void.dart.strong.modular.expect | 4 +- ...implements_void.dart.strong.outline.expect | 8 +- ...ements_void.dart.strong.transformed.expect | 4 +- .../instantiate_enum/main.dart.strong.expect | 4 +- .../main.dart.strong.modular.expect | 2 +- .../main.dart.strong.outline.expect | 8 +- .../main.dart.strong.transformed.expect | 4 +- .../general/issue48487.dart.strong.expect | 2 +- .../issue48487.dart.strong.modular.expect | 2 +- .../issue48487.dart.strong.outline.expect | 4 +- .../issue48487.dart.strong.transformed.expect | 2 +- .../general/issue48487b.dart.strong.expect | 4 +- .../issue48487b.dart.strong.modular.expect | 4 +- .../issue48487b.dart.strong.outline.expect | 4 +- ...issue48487b.dart.strong.transformed.expect | 4 +- .../general/issue49216.dart.strong.expect | 2 +- .../issue49216.dart.strong.modular.expect | 2 +- .../issue49216.dart.strong.outline.expect | 4 +- .../issue49216.dart.strong.transformed.expect | 2 +- .../issue49697/main.dart.strong.expect | 12 +- .../main.dart.strong.modular.expect | 6 +- .../main.dart.strong.outline.expect | 24 +- .../main.dart.strong.transformed.expect | 12 +- .../issue49697_2/main.dart.strong.expect | 12 +- .../main.dart.strong.modular.expect | 6 +- .../main.dart.strong.outline.expect | 24 +- .../main.dart.strong.transformed.expect | 12 +- .../general/issue54267a.dart.strong.expect | 8 +- .../issue54267a.dart.strong.modular.expect | 8 +- .../issue54267a.dart.strong.outline.expect | 2 +- ...issue54267a.dart.strong.transformed.expect | 8 +- .../general/issue54267b.dart.strong.expect | 8 +- .../issue54267b.dart.strong.modular.expect | 8 +- .../issue54267b.dart.strong.outline.expect | 4 +- ...issue54267b.dart.strong.transformed.expect | 8 +- .../general/issue55152.dart.strong.expect | 2 +- .../issue55152.dart.strong.modular.expect | 2 +- .../issue55152.dart.strong.outline.expect | 4 +- .../issue55152.dart.strong.transformed.expect | 2 +- .../general/metadata_enum.dart.strong.expect | 2 +- .../metadata_enum.dart.strong.modular.expect | 2 +- .../metadata_enum.dart.strong.outline.expect | 4 +- ...tadata_enum.dart.strong.transformed.expect | 2 +- .../general/type_scopes.dart.strong.expect | 2 +- .../type_scopes.dart.strong.modular.expect | 2 +- .../type_scopes.dart.strong.outline.expect | 4 +- ...type_scopes.dart.strong.transformed.expect | 2 +- .../declared_hashcode.dart.strong.expect | 2 +- ...clared_hashcode.dart.strong.modular.expect | 2 +- ...clared_hashcode.dart.strong.outline.expect | 4 +- ...ed_hashcode.dart.strong.transformed.expect | 2 +- .../declared_index.dart.strong.expect | 2 +- .../declared_index.dart.strong.modular.expect | 2 +- .../declared_index.dart.strong.outline.expect | 4 +- ...lared_index.dart.strong.transformed.expect | 2 +- .../declared_values.dart.strong.expect | 2 +- ...declared_values.dart.strong.modular.expect | 2 +- ...declared_values.dart.strong.outline.expect | 4 +- ...ared_values.dart.strong.transformed.expect | 2 +- ...etter_getter_type_check.dart.strong.expect | 2 +- ...tter_type_check.dart.strong.modular.expect | 2 +- ...tter_type_check.dart.strong.outline.expect | 4 +- ..._type_check.dart.strong.transformed.expect | 2 +- .../export_through_dill.yaml.world.1.expect | 2 +- .../export_through_dill.yaml.world.2.expect | 2 +- .../no_outline_change_2.yaml.world.1.expect | 2 +- .../no_outline_change_2.yaml.world.2.expect | 2 +- .../no_outline_change_6.yaml.world.1.expect | 2 +- .../no_outline_change_6.yaml.world.2.expect | 2 +- .../no_outline_change_6.yaml.world.3.expect | 2 +- .../no_outline_change_7.yaml.world.1.expect | 2 +- .../no_outline_change_7.yaml.world.2.expect | 2 +- .../inferred_type_is_enum.dart.strong.expect | 2 +- ...ed_type_is_enum.dart.strong.modular.expect | 2 +- ...ed_type_is_enum.dart.strong.outline.expect | 4 +- ...ype_is_enum.dart.strong.transformed.expect | 2 +- ...red_type_is_enum_values.dart.strong.expect | 2 +- ..._is_enum_values.dart.strong.modular.expect | 2 +- ..._is_enum_values.dart.strong.outline.expect | 4 +- ...enum_values.dart.strong.transformed.expect | 2 +- .../nnbd/return_null.dart.strong.expect | 2 +- .../return_null.dart.strong.modular.expect | 2 +- .../return_null.dart.strong.outline.expect | 4 +- ...return_null.dart.strong.transformed.expect | 2 +- .../switch_nullable_enum.dart.strong.expect | 2 +- ...h_nullable_enum.dart.strong.modular.expect | 2 +- ...h_nullable_enum.dart.strong.outline.expect | 4 +- ...llable_enum.dart.strong.transformed.expect | 2 +- .../switch_encoding.dart.strong.expect | 2 +- ...switch_encoding.dart.strong.modular.expect | 2 +- ...switch_encoding.dart.strong.outline.expect | 4 +- ...ch_encoding.dart.strong.transformed.expect | 2 +- .../enum_switch.dart.strong.expect | 4 +- .../enum_switch.dart.strong.modular.expect | 4 +- .../enum_switch.dart.strong.outline.expect | 8 +- ...enum_switch.dart.strong.transformed.expect | 4 +- .../issue51716/main.dart.strong.expect | 10 +- .../main.dart.strong.modular.expect | 8 +- .../main.dart.strong.outline.expect | 20 +- .../main.dart.strong.transformed.expect | 10 +- .../patterns/issue51800.dart.strong.expect | 2 +- .../issue51800.dart.strong.modular.expect | 2 +- .../issue51800.dart.strong.outline.expect | 4 +- .../issue51800.dart.strong.transformed.expect | 2 +- .../patterns/omitted_break.dart.strong.expect | 2 +- .../omitted_break.dart.strong.modular.expect | 2 +- .../omitted_break.dart.strong.outline.expect | 4 +- ...itted_break.dart.strong.transformed.expect | 2 +- .../switch_encoding.dart.strong.expect | 2 +- ...switch_encoding.dart.strong.modular.expect | 2 +- ...switch_encoding.dart.strong.outline.expect | 4 +- ...ch_encoding.dart.strong.transformed.expect | 2 +- .../testcases/rasta/enum.dart.strong.expect | 2 +- .../rasta/enum.dart.strong.modular.expect | 2 +- .../rasta/enum.dart.strong.outline.expect | 4 +- .../rasta/enum.dart.strong.transformed.expect | 2 +- ...licate_enum_constructor.dart.strong.expect | 2 +- ...num_constructor.dart.strong.modular.expect | 2 +- ...num_constructor.dart.strong.outline.expect | 4 +- ...constructor.dart.strong.transformed.expect | 2 +- ...ents_then_good_ones_etc.dart.strong.expect | 2 +- ...n_good_ones_etc.dart.strong.modular.expect | 2 +- ...n_good_ones_etc.dart.strong.outline.expect | 4 +- ...od_ones_etc.dart.strong.transformed.expect | 2 +- .../enum.dart.strong.expect | 2 +- .../enum.dart.strong.modular.expect | 2 +- .../enum.dart.strong.outline.expect | 4 +- .../enum.dart.strong.transformed.expect | 2 +- .../testcases/textual_outline.status | 1 + .../not_transformed.expect | 2 +- .../to_string_transformer/transformed.expect | 2 +- .../control_flow.dart.expect | 6 +- .../uce_testcases.dart.expect | 2 +- ...atform_testcases.dart.android.debug.expect | 2 +- ...ases.dart.android.debug.withAsserts.expect | 2 +- .../platform_testcases.dart.android.expect | 2 +- ..._testcases.dart.android.withAsserts.expect | 2 +- ...atform_testcases.dart.fuchsia.debug.expect | 2 +- ...ases.dart.fuchsia.debug.withAsserts.expect | 2 +- .../platform_testcases.dart.fuchsia.expect | 2 +- ..._testcases.dart.fuchsia.withAsserts.expect | 2 +- .../platform_testcases.dart.ios.debug.expect | 2 +- ...estcases.dart.ios.debug.withAsserts.expect | 2 +- .../platform_testcases.dart.ios.expect | 2 +- ...form_testcases.dart.ios.withAsserts.expect | 2 +- ...platform_testcases.dart.linux.debug.expect | 2 +- ...tcases.dart.linux.debug.withAsserts.expect | 2 +- .../platform_testcases.dart.linux.expect | 2 +- ...rm_testcases.dart.linux.withAsserts.expect | 2 +- ...platform_testcases.dart.macos.debug.expect | 2 +- ...tcases.dart.macos.debug.withAsserts.expect | 2 +- .../platform_testcases.dart.macos.expect | 2 +- ...rm_testcases.dart.macos.withAsserts.expect | 2 +- ...atform_testcases.dart.windows.debug.expect | 2 +- ...ases.dart.windows.debug.withAsserts.expect | 2 +- .../platform_testcases.dart.windows.expect | 2 +- ..._testcases.dart.windows.withAsserts.expect | 2 +- 432 files changed, 3187 insertions(+), 2135 deletions(-) create mode 100644 pkg/front_end/lib/src/fragment/enum_element.dart create mode 100644 pkg/front_end/testcases/enhanced_enums/cyclic.dart create mode 100644 pkg/front_end/testcases/enhanced_enums/cyclic.dart.strong.expect create mode 100644 pkg/front_end/testcases/enhanced_enums/cyclic.dart.strong.modular.expect create mode 100644 pkg/front_end/testcases/enhanced_enums/cyclic.dart.strong.outline.expect create mode 100644 pkg/front_end/testcases/enhanced_enums/cyclic.dart.strong.transformed.expect create mode 100644 pkg/front_end/testcases/enhanced_enums/cyclic.dart.textual_outline.expect create mode 100644 pkg/front_end/testcases/enhanced_enums/cyclic.dart.textual_outline_modelled.expect create mode 100644 pkg/front_end/testcases/enhanced_enums/external_constructor.dart create mode 100644 pkg/front_end/testcases/enhanced_enums/external_constructor.dart.strong.expect create mode 100644 pkg/front_end/testcases/enhanced_enums/external_constructor.dart.strong.modular.expect create mode 100644 pkg/front_end/testcases/enhanced_enums/external_constructor.dart.strong.outline.expect create mode 100644 pkg/front_end/testcases/enhanced_enums/external_constructor.dart.strong.transformed.expect create mode 100644 pkg/front_end/testcases/enhanced_enums/external_constructor.dart.textual_outline.expect diff --git a/pkg/dart2bytecode/testcases/literals.dart.expect b/pkg/dart2bytecode/testcases/literals.dart.expect index 49bff5e12998..3f4d2b759232 100644 --- a/pkg/dart2bytecode/testcases/literals.dart.expect +++ b/pkg/dart2bytecode/testcases/literals.dart.expect @@ -465,7 +465,7 @@ ConstantPool { Class 'A', script = 'DART_SDK/pkg/dart2bytecode/testcases/literals.dart', enum extends dart:core::_Enum -Field 'values', type = dart:core::List < DART_SDK/pkg/dart2bytecode/testcases/literals.dart::A >, getter = 'get:values', reflectable, static, const, final, is-late, has-initializer +Field 'elem1', type = DART_SDK/pkg/dart2bytecode/testcases/literals.dart::A, getter = 'get:elem1', reflectable, static, const, final, is-late, has-initializer initializer Bytecode { Entry 0 @@ -474,11 +474,11 @@ Bytecode { ReturnTOS } ConstantPool { - [0] = ObjectRef const List [const DART_SDK/pkg/dart2bytecode/testcases/literals.dart::A {dart:core::_Enum::index (field): const 0, dart:core::_Enum::_name (field): 'elem1'}, const DART_SDK/pkg/dart2bytecode/testcases/literals.dart::A {dart:core::_Enum::index (field): const 1, dart:core::_Enum::_name (field): 'elem2'}, const DART_SDK/pkg/dart2bytecode/testcases/literals.dart::A {dart:core::_Enum::index (field): const 2, dart:core::_Enum::_name (field): 'elem3'}, const DART_SDK/pkg/dart2bytecode/testcases/literals.dart::A {dart:core::_Enum::index (field): const 3, dart:core::_Enum::_name (field): 'elem4'}] + [0] = ObjectRef const DART_SDK/pkg/dart2bytecode/testcases/literals.dart::A {dart:core::_Enum::index (field): const 0, dart:core::_Enum::_name (field): 'elem1'} } -Field 'elem1', type = DART_SDK/pkg/dart2bytecode/testcases/literals.dart::A, getter = 'get:elem1', reflectable, static, const, final, is-late, has-initializer +Field 'elem2', type = DART_SDK/pkg/dart2bytecode/testcases/literals.dart::A, getter = 'get:elem2', reflectable, static, const, final, is-late, has-initializer initializer Bytecode { Entry 0 @@ -487,11 +487,11 @@ Bytecode { ReturnTOS } ConstantPool { - [0] = ObjectRef const DART_SDK/pkg/dart2bytecode/testcases/literals.dart::A {dart:core::_Enum::index (field): const 0, dart:core::_Enum::_name (field): 'elem1'} + [0] = ObjectRef const DART_SDK/pkg/dart2bytecode/testcases/literals.dart::A {dart:core::_Enum::index (field): const 1, dart:core::_Enum::_name (field): 'elem2'} } -Field 'elem2', type = DART_SDK/pkg/dart2bytecode/testcases/literals.dart::A, getter = 'get:elem2', reflectable, static, const, final, is-late, has-initializer +Field 'elem3', type = DART_SDK/pkg/dart2bytecode/testcases/literals.dart::A, getter = 'get:elem3', reflectable, static, const, final, is-late, has-initializer initializer Bytecode { Entry 0 @@ -500,11 +500,11 @@ Bytecode { ReturnTOS } ConstantPool { - [0] = ObjectRef const DART_SDK/pkg/dart2bytecode/testcases/literals.dart::A {dart:core::_Enum::index (field): const 1, dart:core::_Enum::_name (field): 'elem2'} + [0] = ObjectRef const DART_SDK/pkg/dart2bytecode/testcases/literals.dart::A {dart:core::_Enum::index (field): const 2, dart:core::_Enum::_name (field): 'elem3'} } -Field 'elem3', type = DART_SDK/pkg/dart2bytecode/testcases/literals.dart::A, getter = 'get:elem3', reflectable, static, const, final, is-late, has-initializer +Field 'elem4', type = DART_SDK/pkg/dart2bytecode/testcases/literals.dart::A, getter = 'get:elem4', reflectable, static, const, final, is-late, has-initializer initializer Bytecode { Entry 0 @@ -513,11 +513,11 @@ Bytecode { ReturnTOS } ConstantPool { - [0] = ObjectRef const DART_SDK/pkg/dart2bytecode/testcases/literals.dart::A {dart:core::_Enum::index (field): const 2, dart:core::_Enum::_name (field): 'elem3'} + [0] = ObjectRef const DART_SDK/pkg/dart2bytecode/testcases/literals.dart::A {dart:core::_Enum::index (field): const 3, dart:core::_Enum::_name (field): 'elem4'} } -Field 'elem4', type = DART_SDK/pkg/dart2bytecode/testcases/literals.dart::A, getter = 'get:elem4', reflectable, static, const, final, is-late, has-initializer +Field 'values', type = dart:core::List < DART_SDK/pkg/dart2bytecode/testcases/literals.dart::A >, getter = 'get:values', reflectable, static, const, final, is-late, has-initializer initializer Bytecode { Entry 0 @@ -526,7 +526,7 @@ Bytecode { ReturnTOS } ConstantPool { - [0] = ObjectRef const DART_SDK/pkg/dart2bytecode/testcases/literals.dart::A {dart:core::_Enum::index (field): const 3, dart:core::_Enum::_name (field): 'elem4'} + [0] = ObjectRef const List [const DART_SDK/pkg/dart2bytecode/testcases/literals.dart::A {dart:core::_Enum::index (field): const 0, dart:core::_Enum::_name (field): 'elem1'}, const DART_SDK/pkg/dart2bytecode/testcases/literals.dart::A {dart:core::_Enum::index (field): const 1, dart:core::_Enum::_name (field): 'elem2'}, const DART_SDK/pkg/dart2bytecode/testcases/literals.dart::A {dart:core::_Enum::index (field): const 2, dart:core::_Enum::_name (field): 'elem3'}, const DART_SDK/pkg/dart2bytecode/testcases/literals.dart::A {dart:core::_Enum::index (field): const 3, dart:core::_Enum::_name (field): 'elem4'}] } diff --git a/pkg/front_end/lib/src/base/scope.dart b/pkg/front_end/lib/src/base/scope.dart index 45bb7944da79..405481f9a10d 100644 --- a/pkg/front_end/lib/src/base/scope.dart +++ b/pkg/front_end/lib/src/base/scope.dart @@ -695,6 +695,10 @@ mixin ErroneousMemberBuilderMixin implements SourceMemberBuilder { // Coverage-ignore(suite): Not run. bool get isSynthesized => false; + @override + // Coverage-ignore(suite): Not run. + bool get isEnumElement => false; + @override bool get isConflictingSetter => false; diff --git a/pkg/front_end/lib/src/builder/member_builder.dart b/pkg/front_end/lib/src/builder/member_builder.dart index 0c5c795268bc..21567ba0732d 100644 --- a/pkg/front_end/lib/src/builder/member_builder.dart +++ b/pkg/front_end/lib/src/builder/member_builder.dart @@ -93,6 +93,9 @@ abstract class MemberBuilder implements Builder { bool get isAbstract; + /// Returns `true` if this member is declared by an enum element. + bool get isEnumElement; + /// Returns `true` if this member is a setter that conflicts with the implicit /// setter of a field. bool get isConflictingSetter; diff --git a/pkg/front_end/lib/src/dill/dill_extension_member_builder.dart b/pkg/front_end/lib/src/dill/dill_extension_member_builder.dart index de675b064f69..927379a6789e 100644 --- a/pkg/front_end/lib/src/dill/dill_extension_member_builder.dart +++ b/pkg/front_end/lib/src/dill/dill_extension_member_builder.dart @@ -82,6 +82,10 @@ class DillExtensionFieldBuilder extends DillExtensionMemberBuilder { // Coverage-ignore(suite): Not run. bool get isProperty => true; + @override + // Coverage-ignore(suite): Not run. + bool get isEnumElement => field.isEnumElement; + @override // Coverage-ignore(suite): Not run. Iterable get exportedMemberReferences => @@ -124,6 +128,10 @@ class DillExtensionSetterBuilder extends DillExtensionMemberBuilder { // Coverage-ignore(suite): Not run. Reference? get invokeTargetReference => null; + @override + // Coverage-ignore(suite): Not run. + bool get isEnumElement => false; + @override // Coverage-ignore(suite): Not run. Iterable get exportedMemberReferences => [procedure.reference]; @@ -165,6 +173,10 @@ class DillExtensionGetterBuilder extends DillExtensionMemberBuilder { // Coverage-ignore(suite): Not run. Reference get invokeTargetReference => procedure.reference; + @override + // Coverage-ignore(suite): Not run. + bool get isEnumElement => false; + @override // Coverage-ignore(suite): Not run. Iterable get exportedMemberReferences => [procedure.reference]; @@ -206,6 +218,10 @@ class DillExtensionOperatorBuilder extends DillExtensionMemberBuilder { // Coverage-ignore(suite): Not run. Reference get invokeTargetReference => procedure.reference; + @override + // Coverage-ignore(suite): Not run. + bool get isEnumElement => false; + @override // Coverage-ignore(suite): Not run. Iterable get exportedMemberReferences => [procedure.reference]; @@ -249,6 +265,10 @@ class DillExtensionStaticMethodBuilder extends DillExtensionMemberBuilder { // Coverage-ignore(suite): Not run. Reference get invokeTargetReference => procedure.reference; + @override + // Coverage-ignore(suite): Not run. + bool get isEnumElement => false; + @override // Coverage-ignore(suite): Not run. Iterable get exportedMemberReferences => [procedure.reference]; @@ -294,6 +314,10 @@ class DillExtensionInstanceMethodBuilder extends DillExtensionMemberBuilder { @override Member get invokeTarget => procedure; + @override + // Coverage-ignore(suite): Not run. + bool get isEnumElement => false; + @override // Coverage-ignore(suite): Not run. Reference get invokeTargetReference => procedure.reference; diff --git a/pkg/front_end/lib/src/dill/dill_extension_type_member_builder.dart b/pkg/front_end/lib/src/dill/dill_extension_type_member_builder.dart index 1b407205442e..eaefc97f9541 100644 --- a/pkg/front_end/lib/src/dill/dill_extension_type_member_builder.dart +++ b/pkg/front_end/lib/src/dill/dill_extension_type_member_builder.dart @@ -124,6 +124,10 @@ class DillExtensionTypeFieldBuilder extends DillExtensionTypeMemberBuilder { // Coverage-ignore(suite): Not run. bool get isProperty => true; + @override + // Coverage-ignore(suite): Not run. + bool get isEnumElement => field.isEnumElement; + @override // Coverage-ignore(suite): Not run. Iterable get exportedMemberReferences => @@ -165,6 +169,10 @@ class DillExtensionTypeSetterBuilder extends DillExtensionTypeMemberBuilder { // Coverage-ignore(suite): Not run. Reference? get invokeTargetReference => null; + @override + // Coverage-ignore(suite): Not run. + bool get isEnumElement => false; + @override // Coverage-ignore(suite): Not run. Iterable get exportedMemberReferences => [procedure.reference]; @@ -206,6 +214,10 @@ class DillExtensionTypeGetterBuilder extends DillExtensionTypeMemberBuilder { // Coverage-ignore(suite): Not run. Reference get invokeTargetReference => procedure.reference; + @override + // Coverage-ignore(suite): Not run. + bool get isEnumElement => false; + @override // Coverage-ignore(suite): Not run. Iterable get exportedMemberReferences => [procedure.reference]; @@ -247,6 +259,10 @@ class DillExtensionTypeOperatorBuilder extends DillExtensionTypeMemberBuilder { // Coverage-ignore(suite): Not run. Reference get invokeTargetReference => procedure.reference; + @override + // Coverage-ignore(suite): Not run. + bool get isEnumElement => false; + @override // Coverage-ignore(suite): Not run. Iterable get exportedMemberReferences => [procedure.reference]; @@ -290,6 +306,10 @@ class DillExtensionTypeStaticMethodBuilder // Coverage-ignore(suite): Not run. Reference get invokeTargetReference => procedure.reference; + @override + // Coverage-ignore(suite): Not run. + bool get isEnumElement => false; + @override // Coverage-ignore(suite): Not run. Iterable get exportedMemberReferences => [procedure.reference]; @@ -339,6 +359,10 @@ class DillExtensionTypeInstanceMethodBuilder @override // Coverage-ignore(suite): Not run. Reference get invokeTargetReference => procedure.reference; + + @override + // Coverage-ignore(suite): Not run. + bool get isEnumElement => false; } class DillExtensionTypeConstructorBuilder extends DillExtensionTypeMemberBuilder @@ -389,6 +413,10 @@ class DillExtensionTypeConstructorBuilder extends DillExtensionTypeMemberBuilder // Coverage-ignore(suite): Not run. Reference get invokeTargetReference => constructor.reference; + @override + // Coverage-ignore(suite): Not run. + bool get isEnumElement => false; + @override // Coverage-ignore(suite): Not run. Iterable get exportedMemberReferences => [constructor.reference]; @@ -433,6 +461,10 @@ class DillExtensionTypeFactoryBuilder extends DillExtensionTypeMemberBuilder { // Coverage-ignore(suite): Not run. Reference get invokeTargetReference => _procedure.reference; + @override + // Coverage-ignore(suite): Not run. + bool get isEnumElement => false; + @override // Coverage-ignore(suite): Not run. Iterable get exportedMemberReferences => [_procedure.reference]; diff --git a/pkg/front_end/lib/src/dill/dill_member_builder.dart b/pkg/front_end/lib/src/dill/dill_member_builder.dart index 01692a92dd9e..4133f5b44c5d 100644 --- a/pkg/front_end/lib/src/dill/dill_member_builder.dart +++ b/pkg/front_end/lib/src/dill/dill_member_builder.dart @@ -170,6 +170,10 @@ class DillFieldBuilder extends DillMemberBuilder implements FieldBuilder { @override // Coverage-ignore(suite): Not run. bool get isProperty => true; + + @override + // Coverage-ignore(suite): Not run. + bool get isEnumElement => field.isEnumElement; } abstract class DillProcedureBuilder extends DillMemberBuilder @@ -229,6 +233,10 @@ class DillGetterBuilder extends DillProcedureBuilder { @override // Coverage-ignore(suite): Not run. Reference get invokeTargetReference => procedure.reference; + + @override + // Coverage-ignore(suite): Not run. + bool get isEnumElement => false; } class DillSetterBuilder extends DillProcedureBuilder { @@ -262,6 +270,10 @@ class DillSetterBuilder extends DillProcedureBuilder { @override Reference? get invokeTargetReference => null; + + @override + // Coverage-ignore(suite): Not run. + bool get isEnumElement => false; } class DillMethodBuilder extends DillProcedureBuilder { @@ -295,6 +307,10 @@ class DillMethodBuilder extends DillProcedureBuilder { @override // Coverage-ignore(suite): Not run. Reference get invokeTargetReference => procedure.reference; + + @override + // Coverage-ignore(suite): Not run. + bool get isEnumElement => false; } class DillOperatorBuilder extends DillProcedureBuilder { @@ -332,6 +348,10 @@ class DillOperatorBuilder extends DillProcedureBuilder { @override // Coverage-ignore(suite): Not run. Reference get invokeTargetReference => procedure.reference; + + @override + // Coverage-ignore(suite): Not run. + bool get isEnumElement => false; } class DillFactoryBuilder extends DillProcedureBuilder { @@ -368,6 +388,10 @@ class DillFactoryBuilder extends DillProcedureBuilder { @override // Coverage-ignore(suite): Not run. Reference get invokeTargetReference => procedure.reference; + + @override + // Coverage-ignore(suite): Not run. + bool get isEnumElement => false; } class DillConstructorBuilder extends DillMemberBuilder @@ -415,6 +439,10 @@ class DillConstructorBuilder extends DillMemberBuilder // Coverage-ignore(suite): Not run. bool get isConst => constructor.isConst; + @override + // Coverage-ignore(suite): Not run. + bool get isEnumElement => false; + @override // Coverage-ignore(suite): Not run. Iterable get exportedMemberReferences => [constructor.reference]; diff --git a/pkg/front_end/lib/src/fragment/enum.dart b/pkg/front_end/lib/src/fragment/enum.dart index 9cd63cfc0b36..5e6d3701f577 100644 --- a/pkg/front_end/lib/src/fragment/enum.dart +++ b/pkg/front_end/lib/src/fragment/enum.dart @@ -16,11 +16,12 @@ class EnumFragment extends DeclarationFragment implements Fragment { late final List? metadata; late final MixinApplicationBuilder? supertypeBuilder; late final List? interfaces; - late final List? enumConstantInfos; late final List constructorReferences; late final int startOffset; late final int endOffset; + final List enumElements = []; + EnumFragment(this.name, super.fileUri, this.nameOffset, super.typeParameters, super.typeParameterScope, super._nominalParameterNameSpace); @@ -38,6 +39,11 @@ class EnumFragment extends DeclarationFragment implements Fragment { _builder = value; } + @override + void addEnumElement(EnumElementFragment fragment) { + enumElements.add(fragment); + } + @override DeclarationFragmentKind get kind => DeclarationFragmentKind.enumDeclaration; diff --git a/pkg/front_end/lib/src/fragment/enum_element.dart b/pkg/front_end/lib/src/fragment/enum_element.dart new file mode 100644 index 000000000000..9303fa0e4e7d --- /dev/null +++ b/pkg/front_end/lib/src/fragment/enum_element.dart @@ -0,0 +1,543 @@ +// Copyright (c) 2025, 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. + +part of 'fragment.dart'; + +class EnumElementFragment + with FieldDeclarationMixin + implements Fragment, FieldDeclaration, Inferable, InferredTypeListener { + @override + final List? metadata; + + @override + final String name; + + @override + final int nameOffset; + + @override + final Uri fileUri; + + final ConstructorReferenceBuilder? constructorReferenceBuilder; + Token? argumentsBeginToken; + + SourcePropertyBuilder? _builder; + + Field? _field; + late DartType _type = new InferredType.fromEnumElementInitializer(this); + + late final int elementIndex; + + @override + final TypeBuilder type = new InferableTypeBuilder(); + + EnumElementFragment( + {required this.metadata, + required this.name, + required this.nameOffset, + required this.fileUri, + required this.constructorReferenceBuilder, + required this.argumentsBeginToken}); + + @override + SourcePropertyBuilder get builder { + assert(_builder != null, "Builder has not been computed for $this."); + return _builder!; + } + + void set builder(SourcePropertyBuilder value) { + assert(_builder == null, "Builder has already been computed for $this."); + _builder = value; + type.registerInferable(this); + type.registerInferredTypeListener(this); + } + + @override + bool get isEnumElement => true; + + @override + String toString() => '$runtimeType($name,$fileUri,$nameOffset)'; + + @override + Initializer buildErroneousInitializer(Expression effect, Expression value, + {required int fileOffset}) { + throw new UnsupportedError("${runtimeType}.buildErroneousInitializer"); + } + + @override + void buildImplicitDefaultValue() { + throw new UnsupportedError("${runtimeType}.buildImplicitDefaultValue"); + } + + @override + Initializer buildImplicitInitializer() { + throw new UnsupportedError("${runtimeType}.buildImplicitInitializer"); + } + + @override + List buildInitializer(int fileOffset, Expression value, + {required bool isSynthetic}) { + throw new UnsupportedError("${runtimeType}.buildInitializer"); + } + + @override + void buildOutlineExpressions( + ClassHierarchy classHierarchy, + SourceLibraryBuilder libraryBuilder, + DeclarationBuilder? declarationBuilder, + LookupScope parentScope, + List annotatables, + {required bool isClassInstanceMember, + required bool createFileUriExpression}) { + BodyBuilderContext bodyBuilderContext = createBodyBuilderContext(); + for (Annotatable annotatable in annotatables) { + _buildMetadataForOutlineExpressions(libraryBuilder, parentScope, + bodyBuilderContext, annotatable, metadata, + fileUri: fileUri, createFileUriExpression: createFileUriExpression); + } + } + + BodyBuilderContext createBodyBuilderContext() { + return new _EnumElementFragmentBodyBuilderContext( + this, builder.libraryBuilder, builder.declarationBuilder, + isDeclarationInstanceMember: builder.isDeclarationInstanceMember); + } + + @override + void buildOutlineNode(SourceLibraryBuilder libraryBuilder, + NameScheme nameScheme, BuildNodesCallback f, FieldReference references, + {required List? classTypeParameters}) { + _field = new Field.immutable(dummyName, + type: _type, + isFinal: false, + isConst: true, + isStatic: true, + fileUri: fileUri, + fieldReference: references.fieldReference, + getterReference: references.fieldGetterReference, + isEnumElement: true) + ..fileOffset = nameOffset + ..fileEndOffset = nameOffset; + nameScheme + .getFieldMemberName(FieldNameType.Field, name, isSynthesized: false) + .attachMember(_field!); + f(member: _field!, kind: BuiltMemberKind.Field); + } + + void buildElement(SourceEnumBuilder sourceEnumBuilder, DartType selfType, + CoreTypes coreTypes) { + SourceLibraryBuilder libraryBuilder = sourceEnumBuilder.libraryBuilder; + DartType inferredFieldType = selfType; + + String constant = name; + String constructorName = constructorReferenceBuilder?.suffix ?? ""; + String fullConstructorNameForErrors = + constructorReferenceBuilder?.fullNameForErrors ?? name; + int fileOffset = constructorReferenceBuilder?.charOffset ?? nameOffset; + constructorName = constructorName == "new" ? "" : constructorName; + MemberBuilder? constructorBuilder = + sourceEnumBuilder.nameSpace.lookupConstructor(constructorName); + // TODO(CFE Team): Should there be a conversion to an invalid expression + // instead? That's what happens on classes. + while (constructorBuilder?.next != null) { + constructorBuilder = constructorBuilder?.next as MemberBuilder; + } + + ArgumentsImpl arguments; + List enumSyntheticArguments = [ + new IntLiteral(elementIndex), + new StringLiteral(constant), + ]; + List? typeArguments; + List? typeArgumentBuilders = + constructorReferenceBuilder?.typeArguments; + if (typeArgumentBuilders != null) { + typeArguments = []; + for (TypeBuilder typeBuilder in typeArgumentBuilders) { + typeArguments.add( + typeBuilder.build(libraryBuilder, TypeUse.constructorTypeArgument)); + } + } + if (libraryBuilder.libraryFeatures.enhancedEnums.isEnabled) { + // We need to create a BodyBuilder to solve the following: 1) if + // the arguments token is provided, we'll use the BodyBuilder to + // parse them and perform inference, 2) if the type arguments + // aren't provided, but required, we'll use it to infer them, and + // 3) in case of erroneous code the constructor invocation should + // be built via a body builder to detect potential errors. + BodyBuilder bodyBuilder = libraryBuilder.loader + .createBodyBuilderForOutlineExpression( + libraryBuilder, + sourceEnumBuilder.createBodyBuilderContext(), + sourceEnumBuilder.scope, + fileUri); + bodyBuilder.constantContext = ConstantContext.inferred; + + if (argumentsBeginToken != null) { + arguments = bodyBuilder.parseArguments(argumentsBeginToken!); + // We pass `true` for [allowFurtherDelays] here because the members of + // the enums are built before the inference, and the resolution of the + // redirecting factories can't be completed at this moment and + // therefore should be delayed to another invocation of + // [BodyBuilder.performBacklogComputations]. + bodyBuilder.performBacklogComputations(); + + arguments.positional.insertAll(0, enumSyntheticArguments); + arguments.argumentsOriginalOrder?.insertAll(0, enumSyntheticArguments); + argumentsBeginToken = null; + } else { + arguments = new ArgumentsImpl(enumSyntheticArguments); + } + if (typeArguments != null) { + ArgumentsImpl.setNonInferrableArgumentTypes(arguments, typeArguments); + } else if (sourceEnumBuilder.cls.typeParameters.isNotEmpty) { + arguments.types.addAll(new List.filled( + sourceEnumBuilder.cls.typeParameters.length, const UnknownType())); + } + setParents(enumSyntheticArguments, arguments); + if (constructorBuilder == null || + constructorBuilder is! SourceConstructorBuilder) { + assert( + _field!.initializer == null, + "Initializer has already been computed for $this: " + "${_field!.initializer}."); + _field!.initializer = bodyBuilder.buildUnresolvedError( + fullConstructorNameForErrors, fileOffset, + arguments: arguments, kind: UnresolvedKind.Constructor) + ..parent = _field; + } else { + Expression initializer = bodyBuilder.buildStaticInvocation( + constructorBuilder.invokeTarget, arguments, + constness: Constness.explicitConst, + charOffset: nameOffset, + isConstructorInvocation: true); + ExpressionInferenceResult inferenceResult = bodyBuilder.typeInferrer + .inferFieldInitializer( + bodyBuilder, const UnknownType(), initializer); + initializer = inferenceResult.expression; + inferredFieldType = inferenceResult.inferredType; + assert( + _field!.initializer == null, + "Initializer has already been computed for $this: " + "${_field!.initializer}."); + _field!.initializer = initializer..parent = _field; + } + } else { + arguments = new ArgumentsImpl(enumSyntheticArguments); + setParents(enumSyntheticArguments, arguments); + if (constructorBuilder == null || + constructorBuilder is! SourceConstructorBuilder || + !constructorBuilder.isConst) { + // This can only occur if there enhanced enum features are used + // when they are not enabled. + assert(libraryBuilder.loader.hasSeenError); + String text = libraryBuilder.loader.target.context + .format( + templateConstructorNotFound + .withArguments(fullConstructorNameForErrors) + .withLocation(fileUri, fileOffset, noLength), + Severity.error) + .plain; + assert( + _field!.initializer == null, + "Initializer has already been computed for $this: " + "${_field!.initializer}."); + _field!.initializer = new InvalidExpression(text) + ..fileOffset = nameOffset + ..parent = _field; + } else { + Expression initializer = new ConstructorInvocation( + constructorBuilder.invokeTarget as Constructor, arguments, + isConst: true) + ..fileOffset = nameOffset; + assert( + _field!.initializer == null, + "Initializer has already been computed for $this: " + "${_field!.initializer}."); + _field!.initializer = initializer..parent = _field; + } + } + fieldType = inferredFieldType; + } + + @override + void checkTypes(SourceLibraryBuilder libraryBuilder, + TypeEnvironment typeEnvironment, SourcePropertyBuilder? setterBuilder, + {required bool isAbstract, required bool isExternal}) {} + + @override + // Coverage-ignore(suite): Not run. + void checkVariance( + SourceClassBuilder sourceClassBuilder, TypeEnvironment typeEnvironment) {} + + @override + int computeDefaultTypes(ComputeDefaultTypeContext context) { + return 0; + } + + @override + void ensureTypes( + ClassMembersBuilder membersBuilder, + Set? getterOverrideDependencies, + Set? setterOverrideDependencies) { + inferType(membersBuilder.hierarchyBuilder); + } + + @override + // Coverage-ignore(suite): Not run. + Iterable getExportedMemberReferences(FieldReference references) { + return [references.fieldGetterReference]; + } + + @override + bool get hasInitializer => true; + + @override + bool get hasSetter => false; + + @override + // Coverage-ignore(suite): Not run. + shared.Expression? get initializerExpression => + throw new UnsupportedError('${runtimeType}.initializerExpression'); + + @override + // Coverage-ignore(suite): Not run. + bool get isExtensionTypeDeclaredInstanceField => false; + + @override + bool get isFinal => false; + + @override + // Coverage-ignore(suite): Not run. + bool get isLate => false; + + @override + List get localMembers => + [new _EnumElementClassMember(builder, this)]; + + @override + List get localSetters => const []; + + @override + Member get readTarget => _field!; + + @override + Member? get writeTarget => null; + + @override + // Coverage-ignore(suite): Not run. + DartType get _fieldTypeInternal => _type; + + @override + bool get isConst => true; + + @override + // Coverage-ignore(suite): Not run. + void _setCovariantByClassInternal() { + _field!.isCovariantByClass = true; + } + + @override + void set _fieldTypeInternal(DartType value) { + _type = value; + _field?.type = value; + } + + @override + DartType get fieldType => _type; +} + +class _EnumElementClassMember implements ClassMember { + final SourcePropertyBuilder _builder; + final EnumElementFragment _fragment; + + Covariance? _covariance; + + _EnumElementClassMember(this._builder, this._fragment); + + @override + bool get forSetter => false; + + @override + int get charOffset => _fragment.nameOffset; + + @override + DeclarationBuilder get declarationBuilder => _builder.declarationBuilder!; + + @override + // Coverage-ignore(suite): Not run. + List get declarations => + throw new UnsupportedError('$runtimeType.declarations'); + + @override + Uri get fileUri => _fragment.fileUri; + + @override + // Coverage-ignore(suite): Not run. + String get fullName { + String className = declarationBuilder.fullNameForErrors; + return "${className}.${fullNameForErrors}"; + } + + @override + String get fullNameForErrors => _builder.fullNameForErrors; + + @override + // Coverage-ignore(suite): Not run. + Covariance getCovariance(ClassMembersBuilder membersBuilder) { + return _covariance ??= forSetter + ? new Covariance.fromMember(getMember(membersBuilder), + forSetter: forSetter) + : const Covariance.empty(); + } + + @override + Member getMember(ClassMembersBuilder membersBuilder) { + _builder.ensureTypes(membersBuilder); + return forSetter + ? + // Coverage-ignore(suite): Not run. + _builder.writeTarget! + : _builder.readTarget!; + } + + @override + // Coverage-ignore(suite): Not run. + MemberResult getMemberResult(ClassMembersBuilder membersBuilder) { + return new StaticMemberResult(getMember(membersBuilder), memberKind, + isDeclaredAsField: true, + fullName: '${declarationBuilder.name}.${_builder.memberName.text}'); + } + + @override + // Coverage-ignore(suite): Not run. + Member? getTearOff(ClassMembersBuilder membersBuilder) => null; + + @override + bool get hasDeclarations => false; + + @override + // Coverage-ignore(suite): Not run. + void inferType(ClassMembersBuilder membersBuilder) { + _builder.ensureTypes(membersBuilder); + } + + @override + ClassMember get interfaceMember => this; + + @override + bool get isAbstract => false; + + @override + bool get isDuplicate => _builder.isDuplicate; + + @override + // Coverage-ignore(suite): Not run. + bool get isExtensionTypeMember => _builder.isExtensionTypeMember; + + @override + // Coverage-ignore(suite): Not run. + bool get isField => true; + + @override + // Coverage-ignore(suite): Not run. + bool get isGetter => false; + + @override + // Coverage-ignore(suite): Not run. + bool get isInternalImplementation => false; + + @override + // Coverage-ignore(suite): Not run. + bool get isNoSuchMethodForwarder => false; + + @override + // Coverage-ignore(suite): Not run. + bool isObjectMember(ClassBuilder objectClass) { + return declarationBuilder == objectClass; + } + + @override + bool get isProperty => true; + + @override + bool isSameDeclaration(ClassMember other) { + return other is _EnumElementClassMember && + // Coverage-ignore(suite): Not run. + _builder == other._builder; + } + + @override + // Coverage-ignore(suite): Not run. + bool get isSetter => false; + + @override + // Coverage-ignore(suite): Not run. + bool get isSourceDeclaration => true; + + @override + bool get isStatic => true; + + @override + bool get isSynthesized => false; + + @override + // Coverage-ignore(suite): Not run. + ClassMemberKind get memberKind => ClassMemberKind.Getter; + + @override + Name get name => _builder.memberName; + + @override + // Coverage-ignore(suite): Not run. + void registerOverrideDependency(Set overriddenMembers) { + _builder.registerGetterOverrideDependency(overriddenMembers); + } + + @override + String toString() => '$runtimeType($fullName)'; +} + +class _EnumElementFragmentBodyBuilderContext extends BodyBuilderContext { + final EnumElementFragment _fragment; + + _EnumElementFragmentBodyBuilderContext( + this._fragment, + SourceLibraryBuilder libraryBuilder, + DeclarationBuilder? declarationBuilder, + {required bool isDeclarationInstanceMember}) + : super(libraryBuilder, declarationBuilder, + isDeclarationInstanceMember: isDeclarationInstanceMember); + + @override + // Coverage-ignore(suite): Not run. + LocalScope computeFormalParameterInitializerScope(LocalScope parent) { + /// Initializer formals or super parameters cannot occur in getters so + /// we don't need to create a new scope. + return parent; + } + + @override + // Coverage-ignore(suite): Not run. + int get memberNameOffset => _fragment.nameOffset; + + @override + // Coverage-ignore(suite): Not run. + int get memberNameLength => _fragment.name.length; + + @override + // Coverage-ignore(suite): Not run. + AugmentSuperTarget? get augmentSuperTarget { + if (_fragment.builder.isAugmentation) { + return _fragment.builder.augmentSuperTarget; + } + return null; + } + + @override + // Coverage-ignore(suite): Not run. + ConstantContext get constantContext { + return ConstantContext.inferred; + } +} diff --git a/pkg/front_end/lib/src/fragment/extension_type.dart b/pkg/front_end/lib/src/fragment/extension_type.dart index 492595ab6d01..bb6ccef40da2 100644 --- a/pkg/front_end/lib/src/fragment/extension_type.dart +++ b/pkg/front_end/lib/src/fragment/extension_type.dart @@ -17,6 +17,8 @@ class ExtensionTypeFragment extends DeclarationFragment implements Fragment { late final int startOffset; late final int endOffset; + final List primaryConstructorFields = []; + SourceExtensionTypeDeclarationBuilder? _builder; ExtensionTypeFragment( @@ -41,6 +43,11 @@ class ExtensionTypeFragment extends DeclarationFragment implements Fragment { _builder = value; } + @override + void addPrimaryConstructorField(FieldFragment fragment) { + primaryConstructorFields.add(fragment); + } + @override DeclarationFragmentKind get kind => DeclarationFragmentKind.extensionTypeDeclaration; diff --git a/pkg/front_end/lib/src/fragment/field.dart b/pkg/front_end/lib/src/fragment/field.dart index 93694e2faede..b4c46ca4c38c 100644 --- a/pkg/front_end/lib/src/fragment/field.dart +++ b/pkg/front_end/lib/src/fragment/field.dart @@ -4,17 +4,28 @@ part of 'fragment.dart'; -class FieldFragment implements Fragment, Inferable, InferredTypeListener { +class FieldFragment + with FieldDeclarationMixin + implements Fragment, FieldDeclaration, Inferable, InferredTypeListener { @override final String name; + @override final Uri fileUri; + + @override final int nameOffset; + final int endOffset; Token? _initializerToken; Token? _constInitializerToken; + + @override final List? metadata; + + @override final TypeBuilder type; + final bool isTopLevel; final Modifiers modifiers; // TODO(johnniwinther): Create separate fragment for primary constructor @@ -40,6 +51,7 @@ class FieldFragment implements Fragment, Inferable, InferredTypeListener { : _initializerToken = initializerToken, _constInitializerToken = constInitializerToken; + @override bool get hasSetter { if (modifiers.isConst) { return false; @@ -168,6 +180,9 @@ class FieldFragment implements Fragment, Inferable, InferredTypeListener { } } + @override + bool get isEnumElement => false; + BodyBuilderContext createBodyBuilderContext() { return new _FieldFragmentBodyBuilderContext( this, builder.libraryBuilder, builder.declarationBuilder, @@ -180,6 +195,7 @@ class FieldFragment implements Fragment, Inferable, InferredTypeListener { _encoding.registerSuperCall(); } + @override void buildOutlineNode(SourceLibraryBuilder libraryBuilder, NameScheme nameScheme, BuildNodesCallback f, FieldReference references, {required List? classTypeParameters}) { @@ -192,6 +208,7 @@ class FieldFragment implements Fragment, Inferable, InferredTypeListener { _encoding.registerMembers(f); } + @override Iterable getExportedMemberReferences(FieldReference references) { return [ references.getterReference!, @@ -201,9 +218,11 @@ class FieldFragment implements Fragment, Inferable, InferredTypeListener { shared.Expression? _initializerExpression; + @override // Coverage-ignore(suite): Not run. shared.Expression? get initializerExpression => _initializerExpression; + @override void buildOutlineExpressions( ClassHierarchy classHierarchy, SourceLibraryBuilder libraryBuilder, @@ -250,6 +269,7 @@ class FieldFragment implements Fragment, Inferable, InferredTypeListener { _constInitializerToken = null; } + @override void checkTypes(SourceLibraryBuilder libraryBuilder, TypeEnvironment typeEnvironment, SourcePropertyBuilder? setterBuilder, {required bool isAbstract, required bool isExternal}) { @@ -265,6 +285,7 @@ class FieldFragment implements Fragment, Inferable, InferredTypeListener { fileUri: fileUri); } + @override void ensureTypes( ClassMembersBuilder membersBuilder, Set? getterOverrideDependencies, @@ -286,6 +307,7 @@ class FieldFragment implements Fragment, Inferable, InferredTypeListener { } } + @override void checkVariance( SourceClassBuilder sourceClassBuilder, TypeEnvironment typeEnvironment) { sourceClassBuilder.checkVarianceInField(typeEnvironment, @@ -297,6 +319,7 @@ class FieldFragment implements Fragment, Inferable, InferredTypeListener { fileOffset: nameOffset); } + @override int computeDefaultTypes(ComputeDefaultTypeContext context) { if (type is! OmittedTypeBuilder) { context.reportInboundReferenceIssuesForType(type); @@ -305,8 +328,10 @@ class FieldFragment implements Fragment, Inferable, InferredTypeListener { return 0; } + @override Member get readTarget => _encoding.readTarget; + @override Member? get writeTarget => _encoding.writeTarget; /// Whether the body of this field has been built. @@ -333,100 +358,61 @@ class FieldFragment implements Fragment, Inferable, InferredTypeListener { _encoding.createBodies(coreTypes, initializer); } + @override DartType get fieldType => _encoding.type; @override - void inferTypes(ClassHierarchyBase hierarchy) { - inferType(hierarchy); - } - - DartType inferType(ClassHierarchyBase hierarchy) { - if (fieldType is! InferredType) { - // We have already inferred a type. - return fieldType; - } + // Coverage-ignore(suite): Not run. + DartType get _fieldTypeInternal => _encoding.type; - return builder.libraryBuilder.loader - .withUriForCrashReporting(fileUri, nameOffset, () { - InferredType implicitFieldType = fieldType as InferredType; - DartType inferredType = implicitFieldType.computeType(hierarchy); - if (fieldType is InferredType) { - // `fieldType` may have changed if a circularity was detected when - // [inferredType] was computed. - type.registerInferredType(inferredType); - - // TODO(johnniwinther): Isn't this handled in the [fieldType] setter? - IncludesTypeParametersNonCovariantly? needsCheckVisitor; - DeclarationBuilder? declarationBuilder = builder.declarationBuilder; - if (declarationBuilder is ClassBuilder) { - Class enclosingClass = declarationBuilder.cls; - if (enclosingClass.typeParameters.isNotEmpty) { - needsCheckVisitor = new IncludesTypeParametersNonCovariantly( - enclosingClass.typeParameters, - // We are checking the field type as if it is the type of the - // parameter of the implicit setter and this is a contravariant - // position. - initialVariance: Variance.contravariant); - } - } - if (needsCheckVisitor != null) { - if (fieldType.accept(needsCheckVisitor)) { - _encoding.setCovariantByClass(); - } - } - } - return fieldType; - }); + @override + void set _fieldTypeInternal(DartType value) { + _encoding.type = value; } - void set fieldType(DartType value) { - _encoding.type = value; - DeclarationBuilder? declarationBuilder = builder.declarationBuilder; - // TODO(johnniwinther): Should this be `hasSetter`? - if (!isFinal && !modifiers.isConst && declarationBuilder is ClassBuilder) { - Class enclosingClass = declarationBuilder.cls; - if (enclosingClass.typeParameters.isNotEmpty) { - IncludesTypeParametersNonCovariantly needsCheckVisitor = - new IncludesTypeParametersNonCovariantly( - enclosingClass.typeParameters, - // We are checking the field type as if it is the type of the - // parameter of the implicit setter and this is a contravariant - // position. - initialVariance: Variance.contravariant); - if (value.accept(needsCheckVisitor)) { - _encoding.setCovariantByClass(); - } - } - } + @override + void _setCovariantByClassInternal() { + _encoding.setCovariantByClass(); } + @override Initializer buildErroneousInitializer(Expression effect, Expression value, {required int fileOffset}) { return _encoding.buildErroneousInitializer(effect, value, fileOffset: fileOffset); } + @override void buildImplicitDefaultValue() { _encoding.buildImplicitDefaultValue(); } + @override Initializer buildImplicitInitializer() { return _encoding.buildImplicitInitializer(); } + @override List buildInitializer(int fileOffset, Expression value, {required bool isSynthetic}) { return _encoding.createInitializer(fileOffset, value, isSynthetic: isSynthetic); } + @override bool get hasInitializer => modifiers.hasInitializer; + @override bool get isExtensionTypeDeclaredInstanceField => builder.isExtensionTypeInstanceMember && !isPrimaryConstructorField; + @override bool get isFinal => modifiers.isFinal; + @override + bool get isConst => modifiers.isConst; + + @override bool get isLate => modifiers.isLate; bool get _isStatic => @@ -436,11 +422,8 @@ class FieldFragment implements Fragment, Inferable, InferredTypeListener { String toString() => '$runtimeType($name,$fileUri,$nameOffset)'; @override - void onInferredType(DartType type) { - fieldType = type; - } - List get localMembers => _encoding.localMembers; + @override List get localSetters => _encoding.localSetters; } diff --git a/pkg/front_end/lib/src/fragment/field/class_member.dart b/pkg/front_end/lib/src/fragment/field/class_member.dart index 8d0daa02149a..5b4838593322 100644 --- a/pkg/front_end/lib/src/fragment/field/class_member.dart +++ b/pkg/front_end/lib/src/fragment/field/class_member.dart @@ -108,7 +108,7 @@ class _FieldClassMember implements ClassMember { @override // Coverage-ignore(suite): Not run. - bool get isGetter => false; //!forSetter; + bool get isGetter => false; @override bool get isInternalImplementation => false; @@ -131,7 +131,7 @@ class _FieldClassMember implements ClassMember { } @override - bool get isSetter => false; //forSetter; + bool get isSetter => false; @override bool get isSourceDeclaration => true; diff --git a/pkg/front_end/lib/src/fragment/fragment.dart b/pkg/front_end/lib/src/fragment/fragment.dart index 3b3a13130f5a..4eda6be595c5 100644 --- a/pkg/front_end/lib/src/fragment/fragment.dart +++ b/pkg/front_end/lib/src/fragment/fragment.dart @@ -23,6 +23,7 @@ import '../builder/builder.dart'; import '../builder/constructor_reference_builder.dart'; import '../builder/declaration_builders.dart'; import '../builder/formal_parameter_builder.dart'; +import '../builder/member_builder.dart'; import '../builder/metadata_builder.dart'; import '../builder/mixin_application_builder.dart'; import '../builder/named_type_builder.dart'; @@ -30,6 +31,8 @@ import '../builder/omitted_type_builder.dart'; import '../builder/type_builder.dart'; import '../kernel/body_builder.dart'; import '../kernel/body_builder_context.dart'; +import '../kernel/constness.dart'; +import '../kernel/expression_generator_helper.dart'; import '../kernel/hierarchy/class_member.dart'; import '../kernel/hierarchy/members_builder.dart'; import '../kernel/implicit_field_type.dart'; @@ -53,12 +56,14 @@ import '../source/source_method_builder.dart'; import '../source/source_property_builder.dart'; import '../source/source_type_alias_builder.dart'; import '../source/type_parameter_scope_builder.dart'; +import '../type_inference/inference_results.dart'; import '../type_inference/type_inference_engine.dart'; import '../type_inference/type_schema.dart'; part 'class.dart'; part 'constructor.dart'; part 'enum.dart'; +part 'enum_element.dart'; part 'extension.dart'; part 'extension_type.dart'; part 'factory.dart'; diff --git a/pkg/front_end/lib/src/fragment/util.dart b/pkg/front_end/lib/src/fragment/util.dart index 99d072f63183..972b493f409c 100644 --- a/pkg/front_end/lib/src/fragment/util.dart +++ b/pkg/front_end/lib/src/fragment/util.dart @@ -96,3 +96,196 @@ void _buildFormalForOutlineExpressions(SourceLibraryBuilder libraryBuilder, formal.buildOutlineExpressions(libraryBuilder, declarationBuilder, buildDefaultValue: isClassInstanceMember); } + +/// Common interface for fragments that can declare a field. +abstract class FieldDeclaration { + /// The metadata declared on this fragment. + List? get metadata; + + /// Builds the core AST structures for this field declaration as needed for + /// the outline. + void buildOutlineNode(SourceLibraryBuilder libraryBuilder, + NameScheme nameScheme, BuildNodesCallback f, FieldReference references, + {required List? classTypeParameters}); + + void buildOutlineExpressions( + ClassHierarchy classHierarchy, + SourceLibraryBuilder libraryBuilder, + DeclarationBuilder? declarationBuilder, + LookupScope parentScope, + List annotatables, + {required bool isClassInstanceMember, + required bool createFileUriExpression}); + + int computeDefaultTypes(ComputeDefaultTypeContext context); + + void checkTypes(SourceLibraryBuilder libraryBuilder, + TypeEnvironment typeEnvironment, SourcePropertyBuilder? setterBuilder, + {required bool isAbstract, required bool isExternal}); + + /// Checks the variance of type parameters [sourceClassBuilder] used in the + /// type of this field declaration. + void checkVariance( + SourceClassBuilder sourceClassBuilder, TypeEnvironment typeEnvironment); + + /// The references to the members from this field declaration that are + /// accessible in exports through the name of the builder. + Iterable getExportedMemberReferences(FieldReference references); + + /// Return `true` if the declaration introduces a setter. + bool get hasSetter; + + /// Return `true` if the declaration has an initializer. + bool get hasInitializer; + + /// Return `true` if the declaration is final. + bool get isFinal; + + /// Return `true` if the declaration is late. + bool get isLate; + + /// Return `true` if the declaration is in instance field declared in an + /// extension type. + bool get isExtensionTypeDeclaredInstanceField; + + /// Returns `true` if this field is declared by an enum element. + bool get isEnumElement; + + /// The [ClassMember]s for the getter introduced by this field declaration. + List get localMembers; + + /// The [ClassMember]s for the setter introduced by this field declaration, + /// if any. + List get localSetters; + + /// The [Member] uses as the target for reading from this field declaration. + Member get readTarget; + + /// The [Member] uses as the target for writing to this field declaration, or + /// `null` if this field declaration has no setter. + Member? get writeTarget; + + /// The [TypeBuilder] for the declared type of this field declaration. + TypeBuilder get type; + + /// The [DartType] of this field declaration. + abstract DartType fieldType; + + Initializer buildErroneousInitializer(Expression effect, Expression value, + {required int fileOffset}); + + /// Creates the AST node for this field as the default initializer. + void buildImplicitDefaultValue(); + + /// Create the [Initializer] for the implicit initialization of this field + /// in a constructor. + Initializer buildImplicitInitializer(); + + /// Builds the field initializers for each field used to encode this field + /// using the [fileOffset] for the created nodes and [value] as the initial + /// field value. + List buildInitializer(int fileOffset, Expression value, + {required bool isSynthetic}); + + /// Ensures that the type of this field declaration has been computed. + void ensureTypes( + ClassMembersBuilder membersBuilder, + Set? getterOverrideDependencies, + Set? setterOverrideDependencies); + + /// Infers the type of this field declaration. + DartType inferType(ClassHierarchyBase hierarchy); + + shared.Expression? get initializerExpression; +} + +mixin FieldDeclarationMixin + implements FieldDeclaration, Inferable, InferredTypeListener { + Uri get fileUri; + + int get nameOffset; + + SourcePropertyBuilder get builder; + + bool get isConst; + + void _setCovariantByClassInternal(); + + abstract DartType _fieldTypeInternal; + + @override + void onInferredType(DartType type) { + fieldType = type; + } + + @override + void inferTypes(ClassHierarchyBase hierarchy) { + inferType(hierarchy); + } + + @override + DartType inferType(ClassHierarchyBase hierarchy) { + if (fieldType is! InferredType) { + // We have already inferred a type. + return fieldType; + } + + return builder.libraryBuilder.loader + .withUriForCrashReporting(fileUri, nameOffset, () { + InferredType implicitFieldType = fieldType as InferredType; + DartType inferredType = implicitFieldType.computeType(hierarchy); + if (fieldType is InferredType) { + // `fieldType` may have changed if a circularity was detected when + // [inferredType] was computed. + type.registerInferredType(inferredType); + + // TODO(johnniwinther): Isn't this handled in the [fieldType] setter? + IncludesTypeParametersNonCovariantly? needsCheckVisitor; + DeclarationBuilder? declarationBuilder = builder.declarationBuilder; + if (declarationBuilder is ClassBuilder) { + Class enclosingClass = declarationBuilder.cls; + if (enclosingClass.typeParameters.isNotEmpty) { + needsCheckVisitor = new IncludesTypeParametersNonCovariantly( + enclosingClass.typeParameters, + // We are checking the field type as if it is the type of the + // parameter of the implicit setter and this is a contravariant + // position. + initialVariance: Variance.contravariant); + } + } + if (needsCheckVisitor != null) { + if (fieldType.accept(needsCheckVisitor)) { + _setCovariantByClassInternal(); + } + } + } + return fieldType; + }); + } + + @override + // Coverage-ignore(suite): Not run. + DartType get fieldType => _fieldTypeInternal; + + @override + void set fieldType(DartType value) { + _fieldTypeInternal = value; + DeclarationBuilder? declarationBuilder = builder.declarationBuilder; + // TODO(johnniwinther): Should this be `hasSetter`? + if (!isFinal && !isConst && declarationBuilder is ClassBuilder) { + Class enclosingClass = declarationBuilder.cls; + if (enclosingClass.typeParameters.isNotEmpty) { + IncludesTypeParametersNonCovariantly needsCheckVisitor = + new IncludesTypeParametersNonCovariantly( + enclosingClass.typeParameters, + // We are checking the field type as if it is the type of the + // parameter of the implicit setter and this is a contravariant + // position. + initialVariance: Variance.contravariant); + if (value.accept(needsCheckVisitor)) { + _setCovariantByClassInternal(); + } + } + } + } +} diff --git a/pkg/front_end/lib/src/kernel/implicit_field_type.dart b/pkg/front_end/lib/src/kernel/implicit_field_type.dart index 5a9646c9e787..08f6420fdc2f 100644 --- a/pkg/front_end/lib/src/kernel/implicit_field_type.dart +++ b/pkg/front_end/lib/src/kernel/implicit_field_type.dart @@ -10,9 +10,9 @@ import 'package:kernel/src/printer.dart'; import '../base/constant_context.dart'; import '../base/problems.dart' show unsupported; -import '../builder/builder.dart'; import '../builder/declaration_builders.dart'; import '../builder/inferable_type_builder.dart'; +import '../builder/type_builder.dart'; import '../codes/cfe_codes.dart'; import '../fragment/fragment.dart'; import '../source/source_class_builder.dart'; @@ -37,6 +37,10 @@ abstract class InferredType extends AuxiliaryType { FieldFragment fieldFragment, Token? initializerToken) = _ImplicitFieldFragmentTypeRoot; + factory InferredType.fromEnumElementInitializer( + EnumElementFragment enumElementFragment) = + _ImplicitEnumElementFragmentType; + factory InferredType.fromInferableTypeUse(InferableTypeUse inferableTypeUse) = _InferredTypeUse; @@ -98,6 +102,7 @@ abstract class InferredType extends AuxiliaryType { DartType computeType(ClassHierarchyBase hierarchy); } +// Coverage-ignore(suite): Not run. class _ImplicitFieldTypeRoot extends InferredType { final SourceFieldBuilder fieldBuilder; @@ -107,11 +112,9 @@ class _ImplicitFieldTypeRoot extends InferredType { _ImplicitFieldTypeRoot(this.fieldBuilder, this.initializerToken) : super._(); @override - // Coverage-ignore(suite): Not run. Uri get fileUri => fieldBuilder.fileUri; @override - // Coverage-ignore(suite): Not run. int get charOffset => fieldBuilder.fileOffset; @override @@ -122,7 +125,6 @@ class _ImplicitFieldTypeRoot extends InferredType { @override DartType computeType(ClassHierarchyBase hierarchy) { if (isStarted) { - // Coverage-ignore-block(suite): Not run. fieldBuilder.libraryBuilder.addProblem( templateCantInferTypeDueToCircularity .withArguments(fieldBuilder.name), @@ -135,14 +137,7 @@ class _ImplicitFieldTypeRoot extends InferredType { } isStarted = true; DartType? inferredType; - Builder? parent = fieldBuilder.parent; - if (parent is SourceEnumBuilder && - parent.elementBuilders.contains(fieldBuilder)) { - inferredType = parent.buildElement( - fieldBuilder, parent.libraryBuilder.loader.coreTypes); - } - // Coverage-ignore(suite): Not run. - else if (initializerToken != null) { + if (initializerToken != null) { InterfaceType? enclosingClassThisType = fieldBuilder.classBuilder == null ? null : fieldBuilder.libraryBuilder.loader.typeInferenceEngine.coreTypes @@ -183,13 +178,11 @@ class _ImplicitFieldTypeRoot extends InferredType { } @override - // Coverage-ignore(suite): Not run. void toTextInternal(AstPrinter printer) { printer.write(''); } @override - // Coverage-ignore(suite): Not run. bool equals(Object other, Assumptions? assumptions) { if (identical(this, other)) return true; return other is _ImplicitFieldTypeRoot && @@ -243,14 +236,7 @@ class _ImplicitFieldFragmentTypeRoot extends InferredType { SourceLibraryBuilder libraryBuilder = _fieldFragment.builder.libraryBuilder; DeclarationBuilder? declarationBuilder = _fieldFragment.builder.declarationBuilder; - if (declarationBuilder is SourceEnumBuilder && - declarationBuilder.elementBuilders.contains(_fieldFragment.builder)) { - // Coverage-ignore-block(suite): Not run. - inferredType = declarationBuilder.buildElement( - // TODO(johnniwinther): Create a EnumElementFragment to avoid this. - _fieldFragment.builder as SourceFieldBuilder, - libraryBuilder.loader.coreTypes); - } else if (initializerToken != null) { + if (initializerToken != null) { InterfaceType? enclosingClassThisType = declarationBuilder is SourceClassBuilder ? libraryBuilder.loader.typeInferenceEngine.coreTypes @@ -313,6 +299,73 @@ class _ImplicitFieldFragmentTypeRoot extends InferredType { String toString() => 'ImplicitFieldType(${toStringInternal()})'; } +class _ImplicitEnumElementFragmentType extends InferredType { + final EnumElementFragment _enumElementFragment; + + bool isStarted = false; + + _ImplicitEnumElementFragmentType(this._enumElementFragment) : super._(); + + @override + // Coverage-ignore(suite): Not run. + Uri get fileUri => _enumElementFragment.fileUri; + + @override + // Coverage-ignore(suite): Not run. + int get charOffset => _enumElementFragment.nameOffset; + + @override + DartType inferType(ClassHierarchyBase hierarchy) { + return _enumElementFragment.inferType(hierarchy); + } + + @override + DartType computeType(ClassHierarchyBase hierarchy) { + if (isStarted) { + // Coverage-ignore-block(suite): Not run. + _enumElementFragment.builder.libraryBuilder.addProblem( + templateCantInferTypeDueToCircularity + .withArguments(_enumElementFragment.name), + _enumElementFragment.nameOffset, + _enumElementFragment.name.length, + _enumElementFragment.fileUri); + DartType type = const InvalidType(); + _enumElementFragment.type.registerInferredType(type); + return type; + } + isStarted = true; + SourceLibraryBuilder libraryBuilder = + _enumElementFragment.builder.libraryBuilder; + SourceEnumBuilder sourceEnumBuilder = + _enumElementFragment.builder.declarationBuilder as SourceEnumBuilder; + _enumElementFragment.buildElement( + sourceEnumBuilder, + sourceEnumBuilder.selfType.build(libraryBuilder, TypeUse.enumSelfType), + libraryBuilder.loader.coreTypes); + return _enumElementFragment.fieldType; + } + + @override + // Coverage-ignore(suite): Not run. + void toTextInternal(AstPrinter printer) { + printer.write(''); + } + + @override + // Coverage-ignore(suite): Not run. + bool equals(Object other, Assumptions? assumptions) { + if (identical(this, other)) return true; + return other is _ImplicitEnumElementFragmentType && + _enumElementFragment == other._enumElementFragment; + } + + @override + int get hashCode => _enumElementFragment.hashCode; + + @override + String toString() => 'ImplicitFieldType(${toStringInternal()})'; +} + class _InferredTypeUse extends InferredType { final InferableTypeUse inferableTypeUse; diff --git a/pkg/front_end/lib/src/source/builder_factory.dart b/pkg/front_end/lib/src/source/builder_factory.dart index 72c636daff8f..5da70e0c7dd3 100644 --- a/pkg/front_end/lib/src/source/builder_factory.dart +++ b/pkg/front_end/lib/src/source/builder_factory.dart @@ -24,7 +24,6 @@ import '../builder/type_builder.dart'; import '../fragment/fragment.dart'; import 'offset_map.dart'; import 'source_class_builder.dart'; -import 'source_enum_builder.dart'; import 'source_library_builder.dart'; import 'type_parameter_scope_builder.dart'; @@ -231,10 +230,16 @@ abstract class BuilderFactory { required List? typeParameters, required MixinApplicationBuilder? supertypeBuilder, required List? interfaceBuilders, - required List? enumConstantInfos, required int startOffset, required int endOffset}); + void addEnumElement( + {required List? metadata, + required String name, + required int nameOffset, + required ConstructorReferenceBuilder? constructorReferenceBuilder, + required Token? argumentsBeginToken}); + void addExtensionDeclaration( {required OffsetMap offsetMap, required Token beginToken, diff --git a/pkg/front_end/lib/src/source/outline_builder.dart b/pkg/front_end/lib/src/source/outline_builder.dart index 9adfb9b6e72f..34a0995123b6 100644 --- a/pkg/front_end/lib/src/source/outline_builder.dart +++ b/pkg/front_end/lib/src/source/outline_builder.dart @@ -32,6 +32,9 @@ import '../base/identifiers.dart' import '../base/ignored_parser_errors.dart' show isIgnoredParserError; import '../base/messages.dart'; import '../base/modifiers.dart' show Modifiers; +import '../base/operator.dart' show Operator; +import '../base/problems.dart' show unhandled; +import '../base/uris.dart'; import '../builder/constructor_reference_builder.dart'; import '../builder/declaration_builders.dart'; import '../builder/fixed_type_builder.dart'; @@ -45,13 +48,9 @@ import '../builder/nullability_builder.dart'; import '../builder/omitted_type_builder.dart'; import '../builder/record_type_builder.dart'; import '../builder/type_builder.dart'; -import '../base/operator.dart' show Operator; -import '../base/problems.dart' show unhandled; -import '../base/uris.dart'; import '../kernel/utils.dart'; import 'builder_factory.dart'; import 'offset_map.dart'; -import 'source_enum_builder.dart'; import 'stack_listener_impl.dart'; import 'value_kinds.dart'; @@ -2763,9 +2762,13 @@ class OutlineBuilder extends StackListenerImpl { pop() as ConstructorReferenceBuilder?; Object? enumConstantInfo = pop(); if (enumConstantInfo is EnumConstantInfo) { - push(enumConstantInfo - ..constructorReferenceBuilder = constructorReferenceBuilder - ..argumentsBeginToken = argumentsBeginToken); + push(enumConstantInfo); + _builderFactory.addEnumElement( + metadata: enumConstantInfo.metadata, + name: enumConstantInfo.name, + nameOffset: enumConstantInfo.nameOffset, + constructorReferenceBuilder: constructorReferenceBuilder, + argumentsBeginToken: argumentsBeginToken); } else { assert(enumConstantInfo is ParserRecovery); push(NullValues.EnumConstantInfo); @@ -2905,7 +2908,6 @@ class OutlineBuilder extends StackListenerImpl { typeParameters: typeParameters, supertypeBuilder: mixinBuilder, interfaceBuilders: interfaces, - enumConstantInfos: enumConstantInfos, startOffset: startOffset, endOffset: endOffset); } else { @@ -3983,3 +3985,11 @@ extension on MemberKind { } } } + +class EnumConstantInfo { + final List? metadata; + final String name; + final int nameOffset; + + EnumConstantInfo(this.metadata, this.name, this.nameOffset); +} diff --git a/pkg/front_end/lib/src/source/source_builder_factory.dart b/pkg/front_end/lib/src/source/source_builder_factory.dart index a4d2fb3ca966..a024f63380fd 100644 --- a/pkg/front_end/lib/src/source/source_builder_factory.dart +++ b/pkg/front_end/lib/src/source/source_builder_factory.dart @@ -43,7 +43,6 @@ import '../util/local_stack.dart'; import 'builder_factory.dart'; import 'offset_map.dart'; import 'source_class_builder.dart' show SourceClassBuilder; -import 'source_enum_builder.dart'; import 'source_library_builder.dart'; import 'source_loader.dart' show SourceLoader; import 'type_parameter_scope_builder.dart'; @@ -840,7 +839,6 @@ class BuilderFactoryImpl implements BuilderFactory, BuilderFactoryResult { required List? typeParameters, required MixinApplicationBuilder? supertypeBuilder, required List? interfaceBuilders, - required List? enumConstantInfos, required int startOffset, required int endOffset}) { String name = identifier.name; @@ -861,7 +859,6 @@ class BuilderFactoryImpl implements BuilderFactory, BuilderFactoryResult { declarationFragment.metadata = metadata; declarationFragment.supertypeBuilder = supertypeBuilder; declarationFragment.interfaces = interfaceBuilders; - declarationFragment.enumConstantInfos = enumConstantInfos; declarationFragment.constructorReferences = new List.of(_constructorReferences); declarationFragment.startOffset = startOffset; @@ -874,6 +871,25 @@ class BuilderFactoryImpl implements BuilderFactory, BuilderFactoryResult { offsetMap.registerNamedDeclarationFragment(identifier, declarationFragment); } + @override + void addEnumElement( + {required List? metadata, + required String name, + required int nameOffset, + required ConstructorReferenceBuilder? constructorReferenceBuilder, + required Token? argumentsBeginToken}) { + EnumElementFragment fragment = new EnumElementFragment( + metadata: metadata, + name: name, + nameOffset: nameOffset, + fileUri: _compilationUnit.fileUri, + constructorReferenceBuilder: constructorReferenceBuilder, + argumentsBeginToken: argumentsBeginToken); + _declarationFragments.current.addEnumElement(fragment); + + _addFragment(fragment); + } + @override void addMixinDeclaration( {required OffsetMap offsetMap, diff --git a/pkg/front_end/lib/src/source/source_constructor_builder.dart b/pkg/front_end/lib/src/source/source_constructor_builder.dart index c6460db080ca..425d75a50bf0 100644 --- a/pkg/front_end/lib/src/source/source_constructor_builder.dart +++ b/pkg/front_end/lib/src/source/source_constructor_builder.dart @@ -404,6 +404,10 @@ abstract class AbstractSourceConstructorBuilder @override // Coverage-ignore(suite): Not run. bool get isSynthesized => false; + + @override + // Coverage-ignore(suite): Not run. + bool get isEnumElement => false; } class DeclaredSourceConstructorBuilder @@ -1180,6 +1184,10 @@ class SyntheticSourceConstructorBuilder extends MemberBuilderImpl // Coverage-ignore(suite): Not run. bool get isProperty => false; + @override + // Coverage-ignore(suite): Not run. + bool get isEnumElement => false; + @override // Coverage-ignore(suite): Not run. List get localMembers => diff --git a/pkg/front_end/lib/src/source/source_enum_builder.dart b/pkg/front_end/lib/src/source/source_enum_builder.dart index f1e4cfe8fc5c..836ab9825416 100644 --- a/pkg/front_end/lib/src/source/source_enum_builder.dart +++ b/pkg/front_end/lib/src/source/source_enum_builder.dart @@ -7,12 +7,10 @@ import 'package:_fe_analyzer_shared/src/scanner/token.dart'; import 'package:front_end/src/source/synthetic_method_builder.dart'; import 'package:kernel/ast.dart'; import 'package:kernel/class_hierarchy.dart'; -import 'package:kernel/core_types.dart'; import 'package:kernel/reference_from_index.dart' show IndexedClass; import 'package:kernel/src/bounds_checks.dart'; import 'package:kernel/transformations/flags.dart'; -import '../base/constant_context.dart'; import '../base/modifiers.dart' show Modifiers; import '../base/scope.dart'; import '../builder/builder.dart'; @@ -28,28 +26,16 @@ import '../builder/nullability_builder.dart'; import '../builder/type_builder.dart'; import '../codes/cfe_codes.dart' show - LocatedMessage, - Severity, messageEnumContainsValuesDeclaration, messageEnumNonConstConstructor, messageEnumWithNameValues, messageNoUnnamedConstructorInObject, noLength, - templateConstructorNotFound, - templateDuplicatedDeclaration, - templateDuplicatedDeclarationCause, - templateDuplicatedDeclarationSyntheticCause, - templateEnumContainsRestrictedInstanceDeclaration, - templateEnumConstantSameNameAsEnclosing; -import '../kernel/body_builder.dart'; + templateEnumContainsRestrictedInstanceDeclaration; +import '../fragment/fragment.dart'; import '../kernel/body_builder_context.dart'; -import '../kernel/constness.dart'; import '../kernel/constructor_tearoff_lowering.dart'; -import '../kernel/expression_generator_helper.dart'; -import '../kernel/internal_ast.dart'; import '../kernel/kernel_helper.dart'; -import '../type_inference/inference_results.dart'; -import '../type_inference/type_schema.dart'; import 'name_scheme.dart'; import 'source_class_builder.dart' show SourceClassBuilder; import 'source_constructor_builder.dart'; @@ -61,7 +47,7 @@ class SourceEnumBuilder extends SourceClassBuilder { final int startOffset; final int endOffset; - final List? enumConstantInfos; + final List _enumElements; final TypeBuilder _underscoreEnumTypeBuilder; @@ -77,11 +63,6 @@ class SourceEnumBuilder extends SourceClassBuilder { DeclaredSourceConstructorBuilder? synthesizedDefaultConstructorBuilder; - final List elementBuilders = []; - - final Set _builtElements = - new Set.identity(); - SourceEnumBuilder.internal( {required List? metadata, required String name, @@ -91,7 +72,7 @@ class SourceEnumBuilder extends SourceClassBuilder { required List? interfaceBuilders, required LookupScope typeParameterScope, required DeclarationNameSpaceBuilder nameSpaceBuilder, - required this.enumConstantInfos, + required List enumElements, required SourceLibraryBuilder libraryBuilder, required List constructorReferences, required Uri fileUri, @@ -100,6 +81,7 @@ class SourceEnumBuilder extends SourceClassBuilder { required this.endOffset, required IndexedClass? indexedClass}) : _underscoreEnumTypeBuilder = underscoreEnumTypeBuilder, + _enumElements = enumElements, super( metadata: metadata, modifiers: Modifiers.empty, @@ -125,7 +107,7 @@ class SourceEnumBuilder extends SourceClassBuilder { required TypeBuilder underscoreEnumTypeBuilder, required TypeBuilder? supertypeBuilder, required List? interfaceBuilders, - required List? enumConstantInfos, + required List enumElements, required SourceLibraryBuilder libraryBuilder, required List constructorReferences, required Uri fileUri, @@ -145,7 +127,7 @@ class SourceEnumBuilder extends SourceClassBuilder { interfaceBuilders: interfaceBuilders, typeParameterScope: typeParameterScope, nameSpaceBuilder: nameSpaceBuilder, - enumConstantInfos: enumConstantInfos, + enumElements: enumElements, libraryBuilder: libraryBuilder, constructorReferences: constructorReferences, fileUri: fileUri, @@ -198,8 +180,6 @@ class SourceEnumBuilder extends SourceClassBuilder { } void _createSynthesizedMembers(LibraryBuilder coreLibrary) { - assert(enumConstantInfos == null || enumConstantInfos!.isNotEmpty); - // TODO(ahe): These types shouldn't be looked up in scope, they come // directly from dart:core. intType = new NamedTypeBuilderImpl( @@ -297,7 +277,8 @@ class SourceEnumBuilder extends SourceClassBuilder { Builder? customIndexDeclaration = nameSpace .lookupLocalMember(restrictedInstanceMemberName, setter: false); if (customIndexDeclaration is MemberBuilder && - !customIndexDeclaration.isAbstract) { + !customIndexDeclaration.isAbstract && + !customIndexDeclaration.isEnumElement) { // Retrieve the earliest declaration for error reporting. while (customIndexDeclaration?.next != null) { // Coverage-ignore-block(suite): Not run. @@ -411,94 +392,6 @@ class SourceEnumBuilder extends SourceClassBuilder { nameSpaceBuilder.checkTypeParameterConflict(libraryBuilder, toStringBuilder.name, toStringBuilder, toStringBuilder.fileUri!); - String className = name; - - if (enumConstantInfos != null) { - for (int i = 0; i < enumConstantInfos!.length; i++) { - EnumConstantInfo enumConstantInfo = enumConstantInfos![i]!; - List? metadata = enumConstantInfo.metadata; - String name = enumConstantInfo.name; - MemberBuilder? existing = - nameSpace.lookupLocalMember(name, setter: false) as MemberBuilder?; - if (existing != null) { - // The existing declaration is synthetic if it has the same - // charOffset as the enclosing enum. - bool isSynthetic = existing.fileOffset == fileOffset; - - // Report the error on the member that occurs later in the code. - int existingOffset; - int duplicateOffset; - if (existing.fileOffset < enumConstantInfo.nameOffset) { - existingOffset = existing.fileOffset; - duplicateOffset = enumConstantInfo.nameOffset; - } else { - existingOffset = enumConstantInfo.nameOffset; - duplicateOffset = existing.fileOffset; - } - - List context = isSynthetic - ? [ - templateDuplicatedDeclarationSyntheticCause - .withArguments(name) - .withLocation( - libraryBuilder.fileUri, fileOffset, className.length) - ] - : [ - templateDuplicatedDeclarationCause - .withArguments(name) - .withLocation( - libraryBuilder.fileUri, existingOffset, name.length) - ]; - libraryBuilder.addProblem( - templateDuplicatedDeclaration.withArguments(name), - duplicateOffset, - name.length, - libraryBuilder.fileUri, - context: context); - enumConstantInfos![i] = null; - } else if (name == className) { - libraryBuilder.addProblem( - templateEnumConstantSameNameAsEnclosing.withArguments(name), - enumConstantInfo.nameOffset, - name.length, - libraryBuilder.fileUri); - } - Reference? fieldReference; - Reference? getterReference; - Reference? setterReference; - if (indexedClass != null) { - Name nameName = new Name(name, indexedClass!.library); - fieldReference = indexedClass!.lookupFieldReference(nameName); - getterReference = indexedClass!.lookupGetterReference(nameName); - setterReference = indexedClass!.lookupSetterReference(nameName); - } - SourceFieldBuilder fieldBuilder = new SourceFieldBuilder( - metadata: metadata, - type: libraryBuilder.loader.inferableTypes.addInferableType(), - name: name, - modifiers: - Modifiers.Const | Modifiers.Static | Modifiers.HasInitializer, - isTopLevel: false, - isPrimaryConstructorField: false, - libraryBuilder: libraryBuilder, - declarationBuilder: this, - fileUri: fileUri, - nameOffset: enumConstantInfo.nameOffset, - endOffset: enumConstantInfo.nameOffset, - nameScheme: staticFieldNameScheme, - fieldReference: fieldReference, - fieldGetterReference: getterReference, - fieldSetterReference: setterReference, - initializerToken: enumConstantInfo.argumentsBeginToken, - isEnumElement: true); - nameSpace.addLocalMember(name, fieldBuilder..next = existing, - setter: false); - nameSpaceBuilder.checkTypeParameterConflict(libraryBuilder, - fieldBuilder.name, fieldBuilder, fieldBuilder.fileUri); - elementBuilders.add(fieldBuilder); - } - } - selfType.bind(libraryBuilder, this); if (name == "values") { @@ -515,6 +408,15 @@ class SourceEnumBuilder extends SourceClassBuilder { @override Class build(LibraryBuilder coreLibrary) { + int elementIndex = 0; + for (EnumElementFragment enumElement in _enumElements) { + if (!enumElement.builder.isDuplicate) { + enumElement.elementIndex = elementIndex++; + } else { + enumElement.elementIndex = -1; + } + } + intType.resolveIn(coreLibrary.scope, fileOffset, fileUri, libraryBuilder); stringType.resolveIn( coreLibrary.scope, fileOffset, fileUri, libraryBuilder); @@ -572,169 +474,17 @@ class SourceEnumBuilder extends SourceClassBuilder { return new EnumBodyBuilderContext(this); } - DartType buildElement(SourceFieldBuilder fieldBuilder, CoreTypes coreTypes) { - DartType selfType = - this.selfType.build(libraryBuilder, TypeUse.enumSelfType); - if (!_builtElements.add(fieldBuilder)) return fieldBuilder.fieldType; - - if (enumConstantInfos == null) return selfType; - - String constant = fieldBuilder.name; - - EnumConstantInfo? enumConstantInfo; - int elementIndex = 0; - for (EnumConstantInfo? info in enumConstantInfos!) { - if (info?.name == constant) { - enumConstantInfo = info; - break; - } - // Skip the duplicated entries in numbering. - if (info?.name != null) { - elementIndex++; - } - } - if (enumConstantInfo == null) return selfType; - - DartType inferredFieldType = selfType; - - String constructorName = - enumConstantInfo.constructorReferenceBuilder?.suffix ?? ""; - String fullConstructorNameForErrors = - enumConstantInfo.constructorReferenceBuilder?.fullNameForErrors ?? name; - int fileOffset = enumConstantInfo.constructorReferenceBuilder?.charOffset ?? - enumConstantInfo.nameOffset; - constructorName = constructorName == "new" ? "" : constructorName; - MemberBuilder? constructorBuilder = - nameSpace.lookupConstructor(constructorName); - // TODO(CFE Team): Should there be a conversion to an invalid expression - // instead? That's what happens on classes. - while (constructorBuilder?.next != null) { - constructorBuilder = constructorBuilder?.next as MemberBuilder; - } - - ArgumentsImpl arguments; - List enumSyntheticArguments = [ - new IntLiteral(elementIndex), - new StringLiteral(constant), - ]; - List? typeArguments; - List? typeArgumentBuilders = - enumConstantInfo.constructorReferenceBuilder?.typeArguments; - if (typeArgumentBuilders != null) { - typeArguments = []; - for (TypeBuilder typeBuilder in typeArgumentBuilders) { - typeArguments.add( - typeBuilder.build(libraryBuilder, TypeUse.constructorTypeArgument)); - } - } - if (libraryBuilder.libraryFeatures.enhancedEnums.isEnabled) { - // We need to create a BodyBuilder to solve the following: 1) if - // the arguments token is provided, we'll use the BodyBuilder to - // parse them and perform inference, 2) if the type arguments - // aren't provided, but required, we'll use it to infer them, and - // 3) in case of erroneous code the constructor invocation should - // be built via a body builder to detect potential errors. - BodyBuilder bodyBuilder = libraryBuilder.loader - .createBodyBuilderForOutlineExpression( - libraryBuilder, createBodyBuilderContext(), scope, fileUri); - bodyBuilder.constantContext = ConstantContext.inferred; - - if (enumConstantInfo.argumentsBeginToken != null) { - arguments = - bodyBuilder.parseArguments(enumConstantInfo.argumentsBeginToken!); - // We pass `true` for [allowFurtherDelays] here because the members of - // the enums are built before the inference, and the resolution of the - // redirecting factories can't be completed at this moment and - // therefore should be delayed to another invocation of - // [BodyBuilder.performBacklogComputations]. - bodyBuilder.performBacklogComputations(); - - arguments.positional.insertAll(0, enumSyntheticArguments); - arguments.argumentsOriginalOrder?.insertAll(0, enumSyntheticArguments); - enumConstantInfo.argumentsBeginToken = null; - } else { - arguments = new ArgumentsImpl(enumSyntheticArguments); - } - if (typeArguments != null) { - ArgumentsImpl.setNonInferrableArgumentTypes(arguments, typeArguments); - } else if (cls.typeParameters.isNotEmpty) { - arguments.types.addAll(new List.filled( - cls.typeParameters.length, const UnknownType())); - } - setParents(enumSyntheticArguments, arguments); - if (constructorBuilder == null || - constructorBuilder is! SourceConstructorBuilder) { - if (!fieldBuilder.hasBodyBeenBuilt) { - fieldBuilder.buildBody( - coreTypes, - bodyBuilder.buildUnresolvedError( - fullConstructorNameForErrors, fileOffset, - arguments: arguments, kind: UnresolvedKind.Constructor)); - } - } else { - Expression initializer = bodyBuilder.buildStaticInvocation( - constructorBuilder.invokeTarget, arguments, - constness: Constness.explicitConst, - charOffset: fieldBuilder.fileOffset, - isConstructorInvocation: true); - ExpressionInferenceResult inferenceResult = bodyBuilder.typeInferrer - .inferFieldInitializer( - bodyBuilder, const UnknownType(), initializer); - initializer = inferenceResult.expression; - inferredFieldType = inferenceResult.inferredType; - if (!fieldBuilder.hasBodyBeenBuilt) { - fieldBuilder.buildBody(coreTypes, initializer); - } - } - } else { - arguments = new ArgumentsImpl(enumSyntheticArguments); - setParents(enumSyntheticArguments, arguments); - if (constructorBuilder == null || - constructorBuilder is! SourceConstructorBuilder || - !constructorBuilder.isConst) { - // This can only occur if there enhanced enum features are used - // when they are not enabled. - assert(libraryBuilder.loader.hasSeenError); - String text = libraryBuilder.loader.target.context - .format( - templateConstructorNotFound - .withArguments(fullConstructorNameForErrors) - .withLocation(fieldBuilder.fileUri, fileOffset, noLength), - Severity.error) - .plain; - if (!fieldBuilder.hasBodyBeenBuilt) { - fieldBuilder.buildBody(coreTypes, - new InvalidExpression(text)..fileOffset = this.fileOffset); - } - } else { - Expression initializer = new ConstructorInvocation( - constructorBuilder.invokeTarget as Constructor, arguments, - isConst: true) - ..fileOffset = fieldBuilder.fileOffset; - if (!fieldBuilder.hasBodyBeenBuilt) { - fieldBuilder.buildBody(coreTypes, initializer); - } - } - } - - return inferredFieldType; - } - @override void buildOutlineExpressions(ClassHierarchy classHierarchy, List delayedDefaultValueCloners) { List values = []; - if (enumConstantInfos != null) { - for (EnumConstantInfo? enumConstantInfo in enumConstantInfos!) { - if (enumConstantInfo != null) { - Builder declaration = firstMemberNamed(enumConstantInfo.name)!; - if (declaration.isField) { - SourceFieldBuilder fieldBuilder = declaration as SourceFieldBuilder; - values.add(new StaticGet(fieldBuilder.field)); - } - } + for (EnumElementFragment enumElement in _enumElements) { + enumElement.inferType(classHierarchy); + if (!enumElement.builder.isDuplicate) { + values.add(new StaticGet(enumElement.readTarget)); } } + SourceFieldBuilder valuesBuilder = firstMemberNamed("values") as SourceFieldBuilder; valuesBuilder.buildBody( @@ -744,25 +494,10 @@ class SourceEnumBuilder extends SourceClassBuilder { classHierarchy.coreTypes.objectClass), isConst: true)); - for (SourceFieldBuilder elementBuilder in elementBuilders) { - elementBuilder.type.registerInferredType( - buildElement(elementBuilder, classHierarchy.coreTypes)); - } - super.buildOutlineExpressions(classHierarchy, delayedDefaultValueCloners); } } -class EnumConstantInfo { - final List? metadata; - final String name; - final int nameOffset; - ConstructorReferenceBuilder? constructorReferenceBuilder; - Token? argumentsBeginToken; - - EnumConstantInfo(this.metadata, this.name, this.nameOffset); -} - class _EnumToStringCreator implements SyntheticMethodCreator { final SourceEnumBuilder _enumBuilder; final TypeBuilder _stringTypeBuilder; diff --git a/pkg/front_end/lib/src/source/source_factory_builder.dart b/pkg/front_end/lib/src/source/source_factory_builder.dart index d7f73c82370b..48575ece86f0 100644 --- a/pkg/front_end/lib/src/source/source_factory_builder.dart +++ b/pkg/front_end/lib/src/source/source_factory_builder.dart @@ -190,6 +190,10 @@ class SourceFactoryBuilder extends SourceFunctionBuilderImpl { // Coverage-ignore(suite): Not run. bool get isSynthesized => false; + @override + // Coverage-ignore(suite): Not run. + bool get isEnumElement => false; + Procedure get _procedure => isAugmenting ? origin._procedure : _procedureInternal; diff --git a/pkg/front_end/lib/src/source/source_field_builder.dart b/pkg/front_end/lib/src/source/source_field_builder.dart index 9bb0e96c266b..da30acbddd1c 100644 --- a/pkg/front_end/lib/src/source/source_field_builder.dart +++ b/pkg/front_end/lib/src/source/source_field_builder.dart @@ -87,6 +87,7 @@ class SourceFieldBuilder extends SourceMemberBuilderImpl /// If `true`, this field builder is for the field corresponding to an enum /// element. + @override final bool isEnumElement; @override @@ -334,10 +335,8 @@ class SourceFieldBuilder extends SourceMemberBuilderImpl } if (type is InferableTypeBuilder) { - if (!hasInitializer && - // Coverage-ignore(suite): Not run. - isStatic) { - // Coverage-ignore-block(suite): Not run. + // Coverage-ignore-block(suite): Not run. + if (!hasInitializer && isStatic) { // A static field without type and initializer will always be inferred // to have type `dynamic`. type.registerInferredType(const DynamicType()); @@ -634,14 +633,15 @@ class SourceFieldBuilder extends SourceMemberBuilderImpl } @override + // Coverage-ignore(suite): Not run. void inferTypes(ClassHierarchyBase hierarchy) { inferType(hierarchy); } @override + // Coverage-ignore(suite): Not run. DartType inferType(ClassHierarchyBase hierarchy) { if (fieldType is! InferredType) { - // Coverage-ignore-block(suite): Not run. // We have already inferred a type. return fieldType; } @@ -669,7 +669,6 @@ class SourceFieldBuilder extends SourceMemberBuilderImpl } if (needsCheckVisitor != null) { if (fieldType.accept(needsCheckVisitor)) { - // Coverage-ignore-block(suite): Not run. _fieldEncoding.setGenericCovariantImpl(); } } @@ -679,6 +678,7 @@ class SourceFieldBuilder extends SourceMemberBuilderImpl } @override + // Coverage-ignore(suite): Not run. void onInferredType(DartType type) { fieldType = type; } diff --git a/pkg/front_end/lib/src/source/source_method_builder.dart b/pkg/front_end/lib/src/source/source_method_builder.dart index 8b7ba28bfab7..a4be7807c52d 100644 --- a/pkg/front_end/lib/src/source/source_method_builder.dart +++ b/pkg/front_end/lib/src/source/source_method_builder.dart @@ -126,6 +126,9 @@ class SourceMethodBuilder extends SourceMemberBuilderImpl // Coverage-ignore(suite): Not run. bool get isSynthesized => false; + @override + bool get isEnumElement => false; + // TODO(johnniwinther): What is this supposed to return? @override // Coverage-ignore(suite): Not run. diff --git a/pkg/front_end/lib/src/source/source_property_builder.dart b/pkg/front_end/lib/src/source/source_property_builder.dart index fef0e3c3caea..66c0f8519293 100644 --- a/pkg/front_end/lib/src/source/source_property_builder.dart +++ b/pkg/front_end/lib/src/source/source_property_builder.dart @@ -56,9 +56,8 @@ class SourcePropertyBuilder extends SourceMemberBuilderImpl /// The declarations that introduces this property. Subsequent property of the /// same name must be augmentations. - // TODO(johnniwinther): Support setter and field declarations. // TODO(johnniwinther): Add [_augmentations] field. - FieldFragment? _introductoryField; + FieldDeclaration? _introductoryField; GetterFragment? _introductoryGetable; SetterFragment? _introductorySetable; @@ -125,11 +124,12 @@ class SourcePropertyBuilder extends SourceMemberBuilderImpl required this.declarationBuilder, required this.isStatic, required NameScheme nameScheme, - required FieldFragment fragment, + required FieldDeclaration fragment, + required Modifiers modifiers, required PropertyReferences references}) : _nameScheme = nameScheme, _introductoryField = fragment, - _modifiers = fragment.modifiers, + _modifiers = modifiers, _references = references, _memberName = nameScheme.getDeclaredName(name); @@ -155,6 +155,9 @@ class SourcePropertyBuilder extends SourceMemberBuilderImpl @override bool get isSynthesized => false; + @override + bool get isEnumElement => _introductoryField?.isEnumElement ?? false; + // TODO(johnniwinther): What is this supposed to return? @override // Coverage-ignore(suite): Not run. diff --git a/pkg/front_end/lib/src/source/synthetic_method_builder.dart b/pkg/front_end/lib/src/source/synthetic_method_builder.dart index 093b352f3558..6a91bdce7d67 100644 --- a/pkg/front_end/lib/src/source/synthetic_method_builder.dart +++ b/pkg/front_end/lib/src/source/synthetic_method_builder.dart @@ -140,6 +140,10 @@ class SyntheticMethodBuilder extends SourceMemberBuilderImpl // Coverage-ignore(suite): Not run. bool get isSynthesized => true; + @override + // Coverage-ignore(suite): Not run. + bool get isEnumElement => false; + @override late final List localMembers = [ new _SyntheticMethodClassMember(this) 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 bc8b3d96303c..5f992b49415b 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 @@ -1017,6 +1017,8 @@ _PreBuilder _createPreBuilder(_FragmentName fragmentName) { return new _PropertyPreBuilder.forGetter(fragmentName); case SetterFragment(): return new _PropertyPreBuilder.forSetter(fragmentName); + case EnumElementFragment(): + return new _PropertyPreBuilder.forField(fragmentName); } } @@ -1203,6 +1205,17 @@ void _computeBuildersFromFragments(String name, List fragments, isStatic: declarationBuilder == null || fragment.modifiers.isStatic); addFragment(fragmentName); + case EnumElementFragment(): + _FragmentName fragmentName = new _FragmentName( + _FragmentKind.Property, fragment, + fileUri: fragment.fileUri, + name: fragment.name, + nameOffset: fragment.nameOffset, + nameLength: fragment.name.length, + isAugment: false, + propertyKind: _PropertyKind.FinalField, + isStatic: true); + addFragment(fragmentName); } } @@ -1402,7 +1415,7 @@ void _computeBuildersFromFragments(String name, List fragments, name, declaration, fragment.fileUri, charOffset)); }), interfaceBuilders: fragment.interfaces, - enumConstantInfos: fragment.enumConstantInfos, + enumElements: fragment.enumElements, libraryBuilder: enclosingLibraryBuilder, constructorReferences: fragment.constructorReferences, fileUri: fragment.fileUri, @@ -1441,11 +1454,10 @@ void _computeBuildersFromFragments(String name, List fragments, case ExtensionTypeFragment(): IndexedContainer? indexedContainer = indexedLibrary ?.lookupIndexedExtensionTypeDeclaration(fragment.name); - List? primaryConstructorFields = + List primaryConstructorFields = fragment.primaryConstructorFields; FieldFragment? representationFieldFragment; - if (primaryConstructorFields != null && - primaryConstructorFields.isNotEmpty) { + if (primaryConstructorFields.isNotEmpty) { representationFieldFragment = primaryConstructorFields.first; } SourceExtensionTypeDeclarationBuilder extensionTypeDeclarationBuilder = @@ -1505,6 +1517,7 @@ void _computeBuildersFromFragments(String name, List fragments, isStatic: fragment.modifiers.isStatic, nameScheme: nameScheme, fragment: fragment, + modifiers: fragment.modifiers, references: references); fragment.builder = propertyBuilder; builders.add(new _AddBuilder(fragment.name, propertyBuilder, @@ -1987,6 +2000,34 @@ void _computeBuildersFromFragments(String name, List fragments, loader.buildersCreatedWithReferences[procedureReference] = factoryBuilder; } + case EnumElementFragment(): + NameScheme nameScheme = new NameScheme( + containerName: containerName, + containerType: containerType, + isInstanceMember: false, + libraryName: indexedLibrary != null + ? new LibraryName(indexedLibrary.library.reference) + : enclosingLibraryBuilder.libraryName); + FieldReference references = new FieldReference( + name, nameScheme, indexedContainer, + fieldIsLateWithLowering: false, isExternal: false); + SourcePropertyBuilder propertyBuilder = + new SourcePropertyBuilder.forField( + fileUri: fragment.fileUri, + fileOffset: fragment.nameOffset, + name: name, + libraryBuilder: enclosingLibraryBuilder, + declarationBuilder: declarationBuilder, + isStatic: true, + nameScheme: nameScheme, + fragment: fragment, + modifiers: Modifiers.Const | + Modifiers.Static | + Modifiers.HasInitializer, + references: references); + fragment.builder = propertyBuilder; + builders.add(new _AddBuilder(fragment.name, propertyBuilder, + fragment.fileUri, fragment.nameOffset)); } } @@ -2189,8 +2230,6 @@ abstract class DeclarationFragment { final DeclarationBuilderScope bodyScope = new DeclarationBuilderScope(); final List _fragments = []; - List? primaryConstructorFields; - final List? typeParameters; final NominalParameterNameSpace _nominalParameterNameSpace; @@ -2208,8 +2247,13 @@ abstract class DeclarationFragment { DeclarationBuilder get builder; - void addPrimaryConstructorField(FieldFragment builder) { - (primaryConstructorFields ??= []).add(builder); + void addPrimaryConstructorField(FieldFragment fragment) { + throw new UnsupportedError( + "Unexpected primary constructor field in $this."); + } + + void addEnumElement(EnumElementFragment fragment) { + throw new UnsupportedError("Unexpected enum element in $this."); } void addFragment(Fragment fragment) { diff --git a/pkg/front_end/lib/src/source/value_kinds.dart b/pkg/front_end/lib/src/source/value_kinds.dart index 9eb198574043..b44db46a02c5 100644 --- a/pkg/front_end/lib/src/source/value_kinds.dart +++ b/pkg/front_end/lib/src/source/value_kinds.dart @@ -38,7 +38,6 @@ import '../kernel/body_builder.dart' as type Label; import '../kernel/expression_generator.dart' as type; import 'outline_builder.dart' as type; -import 'source_enum_builder.dart' as type show EnumConstantInfo; class ValueKinds { static const ValueKind AnnotationList = diff --git a/pkg/front_end/test/coverage_suite_expected.dart b/pkg/front_end/test/coverage_suite_expected.dart index ad091f6d507d..b5b6fc4b564a 100644 --- a/pkg/front_end/test/coverage_suite_expected.dart +++ b/pkg/front_end/test/coverage_suite_expected.dart @@ -485,7 +485,12 @@ const Map _expect = { ), // 100.0%. "package:front_end/src/fragment/enum.dart": ( - hitCount: 10, + hitCount: 13, + missCount: 0, + ), + // 100.0%. + "package:front_end/src/fragment/enum_element.dart": ( + hitCount: 224, missCount: 0, ), // 100.0%. @@ -495,7 +500,7 @@ const Map _expect = { ), // 100.0%. "package:front_end/src/fragment/extension_type.dart": ( - hitCount: 10, + hitCount: 13, missCount: 0, ), // 100.0%. @@ -505,7 +510,7 @@ const Map _expect = { ), // 100.0%. "package:front_end/src/fragment/field.dart": ( - hitCount: 300, + hitCount: 259, missCount: 0, ), // 100.0%. @@ -560,7 +565,7 @@ const Map _expect = { ), // 100.0%. "package:front_end/src/fragment/util.dart": ( - hitCount: 17, + hitCount: 64, missCount: 0, ), // 100.0%. @@ -695,7 +700,7 @@ const Map _expect = { ), // 100.0%. "package:front_end/src/kernel/implicit_field_type.dart": ( - hitCount: 97, + hitCount: 93, missCount: 0, ), // 100.0%. @@ -885,7 +890,7 @@ const Map _expect = { ), // 100.0%. "package:front_end/src/source/outline_builder.dart": ( - hitCount: 2127, + hitCount: 2131, missCount: 0, ), // 100.0%. @@ -895,7 +900,7 @@ const Map _expect = { ), // 100.0%. "package:front_end/src/source/source_builder_factory.dart": ( - hitCount: 1199, + hitCount: 1206, missCount: 0, ), // 100.0%. @@ -920,7 +925,7 @@ const Map _expect = { ), // 100.0%. "package:front_end/src/source/source_enum_builder.dart": ( - hitCount: 535, + hitCount: 335, missCount: 0, ), // 100.0%. @@ -941,7 +946,7 @@ const Map _expect = { ), // 100.0%. "package:front_end/src/source/source_field_builder.dart": ( - hitCount: 268, + hitCount: 232, missCount: 0, ), // 100.0%. @@ -966,12 +971,12 @@ const Map _expect = { ), // 100.0%. "package:front_end/src/source/source_method_builder.dart": ( - hitCount: 282, + hitCount: 283, missCount: 0, ), // 100.0%. "package:front_end/src/source/source_property_builder.dart": ( - hitCount: 766, + hitCount: 768, missCount: 0, ), // 100.0%. @@ -991,7 +996,7 @@ const Map _expect = { ), // 100.0%. "package:front_end/src/source/type_parameter_scope_builder.dart": ( - hitCount: 1489, + hitCount: 1514, missCount: 0, ), // 100.0%. diff --git a/pkg/front_end/test/macros/application/data/tests/targets.dart.expect b/pkg/front_end/test/macros/application/data/tests/targets.dart.expect index f708358f297d..00d762f0e476 100644 --- a/pkg/front_end/test/macros/application/data/tests/targets.dart.expect +++ b/pkg/front_end/test/macros/application/data/tests/targets.dart.expect @@ -1859,7 +1859,6 @@ class Class extends core::Object { @#C39 @#C40 class Enum extends core::_Enum /*isEnum*/ { - static const field core::List values = #C44; @#C1 @#C2 @#C3 @@ -1899,6 +1898,7 @@ class Enum extends core::_Enum /*isEnum*/ { @#C37 @#C38 enum-element static const field self::Enum a = #C43; + static const field core::List values = #C44; const synthetic constructor •(core::int #index, core::String #name) → self::Enum : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/class_modifiers/base/outside_library/main.dart.strong.expect b/pkg/front_end/testcases/class_modifiers/base/outside_library/main.dart.strong.expect index e5fe92ac0295..45824340d7a1 100644 --- a/pkg/front_end/testcases/class_modifiers/base/outside_library/main.dart.strong.expect +++ b/pkg/front_end/testcases/class_modifiers/base/outside_library/main.dart.strong.expect @@ -31,8 +31,8 @@ base class ImplementsBaseMixin extends core::Object implements mai::M { ; } class EnumImplementsBaseMixin extends core::_Enum implements mai::M /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::EnumImplementsBaseMixin x = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsBaseMixin : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/class_modifiers/base/outside_library/main.dart.strong.modular.expect b/pkg/front_end/testcases/class_modifiers/base/outside_library/main.dart.strong.modular.expect index 13e3b4d53c04..a0ded4568196 100644 --- a/pkg/front_end/testcases/class_modifiers/base/outside_library/main.dart.strong.modular.expect +++ b/pkg/front_end/testcases/class_modifiers/base/outside_library/main.dart.strong.modular.expect @@ -31,8 +31,8 @@ base class ImplementsBaseMixin extends core::Object implements mai::M { ; } class EnumImplementsBaseMixin extends core::_Enum implements mai::M /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::EnumImplementsBaseMixin x = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsBaseMixin : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/class_modifiers/base/outside_library/main.dart.strong.outline.expect b/pkg/front_end/testcases/class_modifiers/base/outside_library/main.dart.strong.outline.expect index d1044dd0e904..7597141917fc 100644 --- a/pkg/front_end/testcases/class_modifiers/base/outside_library/main.dart.strong.outline.expect +++ b/pkg/front_end/testcases/class_modifiers/base/outside_library/main.dart.strong.outline.expect @@ -29,8 +29,8 @@ base class ImplementsBaseMixin extends core::Object implements mai::M { ; } class EnumImplementsBaseMixin extends core::_Enum implements mai::M /*isEnum*/ { - static const field core::List values = const [self::EnumImplementsBaseMixin::x]; enum-element static const field self::EnumImplementsBaseMixin x = const self::EnumImplementsBaseMixin::•(0, "x"); + static const field core::List values = const [self::EnumImplementsBaseMixin::x]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsBaseMixin : super core::_Enum::•(#index, #name) ; @@ -61,6 +61,6 @@ abstract base class M extends core::Object /*isMixinDeclaration*/ { Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///main.dart:11:6 -> ListConstant(const [const EnumImplementsBaseMixin{_Enum.index: 0, _Enum._name: "x"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main.dart:11:45 -> InstanceConstant(const EnumImplementsBaseMixin{_Enum.index: 0, _Enum._name: "x"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///main.dart:11:6 -> ListConstant(const [const EnumImplementsBaseMixin{_Enum.index: 0, _Enum._name: "x"}]) Extra constant evaluation: evaluated: 7, effectively constant: 2 diff --git a/pkg/front_end/testcases/class_modifiers/base/outside_library/main.dart.strong.transformed.expect b/pkg/front_end/testcases/class_modifiers/base/outside_library/main.dart.strong.transformed.expect index e5fe92ac0295..45824340d7a1 100644 --- a/pkg/front_end/testcases/class_modifiers/base/outside_library/main.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/class_modifiers/base/outside_library/main.dart.strong.transformed.expect @@ -31,8 +31,8 @@ base class ImplementsBaseMixin extends core::Object implements mai::M { ; } class EnumImplementsBaseMixin extends core::_Enum implements mai::M /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::EnumImplementsBaseMixin x = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsBaseMixin : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/class_modifiers/final/outside_library/main.dart.strong.expect b/pkg/front_end/testcases/class_modifiers/final/outside_library/main.dart.strong.expect index b09e9cff6cf2..407c3c65022b 100644 --- a/pkg/front_end/testcases/class_modifiers/final/outside_library/main.dart.strong.expect +++ b/pkg/front_end/testcases/class_modifiers/final/outside_library/main.dart.strong.expect @@ -43,8 +43,8 @@ final class ImplementsFinalClass extends core::Object implements mai::A { ; } class EnumImplementsFinalMixin extends core::_Enum implements mai::A /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::EnumImplementsFinalMixin x = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsFinalMixin : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/class_modifiers/final/outside_library/main.dart.strong.modular.expect b/pkg/front_end/testcases/class_modifiers/final/outside_library/main.dart.strong.modular.expect index d6a0deab8440..44c0c3cfc953 100644 --- a/pkg/front_end/testcases/class_modifiers/final/outside_library/main.dart.strong.modular.expect +++ b/pkg/front_end/testcases/class_modifiers/final/outside_library/main.dart.strong.modular.expect @@ -43,8 +43,8 @@ final class ImplementsFinalClass extends core::Object implements mai::A { ; } class EnumImplementsFinalMixin extends core::_Enum implements mai::A /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::EnumImplementsFinalMixin x = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsFinalMixin : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/class_modifiers/final/outside_library/main.dart.strong.outline.expect b/pkg/front_end/testcases/class_modifiers/final/outside_library/main.dart.strong.outline.expect index 5864fb56ea2a..0ad66836f6c4 100644 --- a/pkg/front_end/testcases/class_modifiers/final/outside_library/main.dart.strong.outline.expect +++ b/pkg/front_end/testcases/class_modifiers/final/outside_library/main.dart.strong.outline.expect @@ -41,8 +41,8 @@ final class ImplementsFinalClass extends core::Object implements mai::A { ; } class EnumImplementsFinalMixin extends core::_Enum implements mai::A /*isEnum*/ { - static const field core::List values = const [self::EnumImplementsFinalMixin::x]; enum-element static const field self::EnumImplementsFinalMixin x = const self::EnumImplementsFinalMixin::•(0, "x"); + static const field core::List values = const [self::EnumImplementsFinalMixin::x]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsFinalMixin : super core::_Enum::•(#index, #name) ; @@ -73,6 +73,6 @@ final class B extends core::Object { Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///main.dart:11:6 -> ListConstant(const [const EnumImplementsFinalMixin{_Enum.index: 0, _Enum._name: "x"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main.dart:11:46 -> InstanceConstant(const EnumImplementsFinalMixin{_Enum.index: 0, _Enum._name: "x"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///main.dart:11:6 -> ListConstant(const [const EnumImplementsFinalMixin{_Enum.index: 0, _Enum._name: "x"}]) Extra constant evaluation: evaluated: 7, effectively constant: 2 diff --git a/pkg/front_end/testcases/class_modifiers/final/outside_library/main.dart.strong.transformed.expect b/pkg/front_end/testcases/class_modifiers/final/outside_library/main.dart.strong.transformed.expect index b09e9cff6cf2..407c3c65022b 100644 --- a/pkg/front_end/testcases/class_modifiers/final/outside_library/main.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/class_modifiers/final/outside_library/main.dart.strong.transformed.expect @@ -43,8 +43,8 @@ final class ImplementsFinalClass extends core::Object implements mai::A { ; } class EnumImplementsFinalMixin extends core::_Enum implements mai::A /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::EnumImplementsFinalMixin x = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsFinalMixin : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/class_modifiers/final/typedef/main.dart.strong.expect b/pkg/front_end/testcases/class_modifiers/final/typedef/main.dart.strong.expect index 96f9a7ced4d7..e8ec925dc9af 100644 --- a/pkg/front_end/testcases/class_modifiers/final/typedef/main.dart.strong.expect +++ b/pkg/front_end/testcases/class_modifiers/final/typedef/main.dart.strong.expect @@ -66,8 +66,8 @@ final class ImplementsFinalClassTypedef2 extends core::Object implements mai::A ; } class EnumImplementsFinalClassTypedef extends core::_Enum implements mai::A /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::EnumImplementsFinalClassTypedef x = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsFinalClassTypedef : super core::_Enum::•(#index, #name) ; @@ -75,8 +75,8 @@ class EnumImplementsFinalClassTypedef extends core::_Enum implements mai::A /*is return "EnumImplementsFinalClassTypedef.${this.{core::_Enum::_name}{core::String}}"; } class EnumImplementsFinalClassTypedef2 extends core::_Enum implements mai::A /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::EnumImplementsFinalClassTypedef2 x = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsFinalClassTypedef2 : super core::_Enum::•(#index, #name) ; @@ -94,8 +94,8 @@ final class ImplementsFinalClassTypedefOutside extends core::Object implements m ; } class EnumImplementsFinalClassTypedefOutside extends core::_Enum implements mai::A /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::EnumImplementsFinalClassTypedefOutside x = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsFinalClassTypedefOutside : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/class_modifiers/final/typedef/main.dart.strong.modular.expect b/pkg/front_end/testcases/class_modifiers/final/typedef/main.dart.strong.modular.expect index 7067389c78e8..325c3f6ef8cd 100644 --- a/pkg/front_end/testcases/class_modifiers/final/typedef/main.dart.strong.modular.expect +++ b/pkg/front_end/testcases/class_modifiers/final/typedef/main.dart.strong.modular.expect @@ -66,8 +66,8 @@ final class ImplementsFinalClassTypedef2 extends core::Object implements mai::A ; } class EnumImplementsFinalClassTypedef extends core::_Enum implements mai::A /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::EnumImplementsFinalClassTypedef x = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsFinalClassTypedef : super core::_Enum::•(#index, #name) ; @@ -75,8 +75,8 @@ class EnumImplementsFinalClassTypedef extends core::_Enum implements mai::A /*is return "EnumImplementsFinalClassTypedef.${this.{core::_Enum::_name}{core::String}}"; } class EnumImplementsFinalClassTypedef2 extends core::_Enum implements mai::A /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::EnumImplementsFinalClassTypedef2 x = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsFinalClassTypedef2 : super core::_Enum::•(#index, #name) ; @@ -94,8 +94,8 @@ final class ImplementsFinalClassTypedefOutside extends core::Object implements m ; } class EnumImplementsFinalClassTypedefOutside extends core::_Enum implements mai::A /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::EnumImplementsFinalClassTypedefOutside x = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsFinalClassTypedefOutside : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/class_modifiers/final/typedef/main.dart.strong.outline.expect b/pkg/front_end/testcases/class_modifiers/final/typedef/main.dart.strong.outline.expect index 5ecaf0a30590..526deee1095e 100644 --- a/pkg/front_end/testcases/class_modifiers/final/typedef/main.dart.strong.outline.expect +++ b/pkg/front_end/testcases/class_modifiers/final/typedef/main.dart.strong.outline.expect @@ -62,8 +62,8 @@ final class ImplementsFinalClassTypedef2 extends core::Object implements mai::A ; } class EnumImplementsFinalClassTypedef extends core::_Enum implements mai::A /*isEnum*/ { - static const field core::List values = const [self::EnumImplementsFinalClassTypedef::x]; enum-element static const field self::EnumImplementsFinalClassTypedef x = const self::EnumImplementsFinalClassTypedef::•(0, "x"); + static const field core::List values = const [self::EnumImplementsFinalClassTypedef::x]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsFinalClassTypedef : super core::_Enum::•(#index, #name) ; @@ -71,8 +71,8 @@ class EnumImplementsFinalClassTypedef extends core::_Enum implements mai::A /*is return "EnumImplementsFinalClassTypedef.${this.{core::_Enum::_name}{core::String}}"; } class EnumImplementsFinalClassTypedef2 extends core::_Enum implements mai::A /*isEnum*/ { - static const field core::List values = const [self::EnumImplementsFinalClassTypedef2::x]; enum-element static const field self::EnumImplementsFinalClassTypedef2 x = const self::EnumImplementsFinalClassTypedef2::•(0, "x"); + static const field core::List values = const [self::EnumImplementsFinalClassTypedef2::x]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsFinalClassTypedef2 : super core::_Enum::•(#index, #name) ; @@ -88,8 +88,8 @@ final class ImplementsFinalClassTypedefOutside extends core::Object implements m ; } class EnumImplementsFinalClassTypedefOutside extends core::_Enum implements mai::A /*isEnum*/ { - static const field core::List values = const [self::EnumImplementsFinalClassTypedefOutside::x]; enum-element static const field self::EnumImplementsFinalClassTypedefOutside x = const self::EnumImplementsFinalClassTypedefOutside::•(0, "x"); + static const field core::List values = const [self::EnumImplementsFinalClassTypedefOutside::x]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsFinalClassTypedefOutside : super core::_Enum::•(#index, #name) ; @@ -110,10 +110,10 @@ final class A extends core::Object { Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///main.dart:15:6 -> ListConstant(const [const EnumImplementsFinalClassTypedef{_Enum.index: 0, _Enum._name: "x"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main.dart:15:60 -> InstanceConstant(const EnumImplementsFinalClassTypedef{_Enum.index: 0, _Enum._name: "x"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///main.dart:17:6 -> ListConstant(const [const EnumImplementsFinalClassTypedef2{_Enum.index: 0, _Enum._name: "x"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///main.dart:15:6 -> ListConstant(const [const EnumImplementsFinalClassTypedef{_Enum.index: 0, _Enum._name: "x"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main.dart:17:62 -> InstanceConstant(const EnumImplementsFinalClassTypedef2{_Enum.index: 0, _Enum._name: "x"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///main.dart:25:6 -> ListConstant(const [const EnumImplementsFinalClassTypedefOutside{_Enum.index: 0, _Enum._name: "x"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///main.dart:17:6 -> ListConstant(const [const EnumImplementsFinalClassTypedef2{_Enum.index: 0, _Enum._name: "x"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main.dart:25:74 -> InstanceConstant(const EnumImplementsFinalClassTypedefOutside{_Enum.index: 0, _Enum._name: "x"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///main.dart:25:6 -> ListConstant(const [const EnumImplementsFinalClassTypedefOutside{_Enum.index: 0, _Enum._name: "x"}]) Extra constant evaluation: evaluated: 21, effectively constant: 6 diff --git a/pkg/front_end/testcases/class_modifiers/final/typedef/main.dart.strong.transformed.expect b/pkg/front_end/testcases/class_modifiers/final/typedef/main.dart.strong.transformed.expect index 96f9a7ced4d7..e8ec925dc9af 100644 --- a/pkg/front_end/testcases/class_modifiers/final/typedef/main.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/class_modifiers/final/typedef/main.dart.strong.transformed.expect @@ -66,8 +66,8 @@ final class ImplementsFinalClassTypedef2 extends core::Object implements mai::A ; } class EnumImplementsFinalClassTypedef extends core::_Enum implements mai::A /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::EnumImplementsFinalClassTypedef x = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsFinalClassTypedef : super core::_Enum::•(#index, #name) ; @@ -75,8 +75,8 @@ class EnumImplementsFinalClassTypedef extends core::_Enum implements mai::A /*is return "EnumImplementsFinalClassTypedef.${this.{core::_Enum::_name}{core::String}}"; } class EnumImplementsFinalClassTypedef2 extends core::_Enum implements mai::A /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::EnumImplementsFinalClassTypedef2 x = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsFinalClassTypedef2 : super core::_Enum::•(#index, #name) ; @@ -94,8 +94,8 @@ final class ImplementsFinalClassTypedefOutside extends core::Object implements m ; } class EnumImplementsFinalClassTypedefOutside extends core::_Enum implements mai::A /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::EnumImplementsFinalClassTypedefOutside x = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsFinalClassTypedefOutside : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/class_modifiers/invalid_enum_modifiers.dart.strong.expect b/pkg/front_end/testcases/class_modifiers/invalid_enum_modifiers.dart.strong.expect index 632b56f15044..e78d9086889f 100644 --- a/pkg/front_end/testcases/class_modifiers/invalid_enum_modifiers.dart.strong.expect +++ b/pkg/front_end/testcases/class_modifiers/invalid_enum_modifiers.dart.strong.expect @@ -26,8 +26,8 @@ import self as self; import "dart:core" as core; class Base extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::Base v = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::Base : super core::_Enum::•(#index, #name) ; @@ -35,8 +35,8 @@ class Base extends core::_Enum /*isEnum*/ { return "Base.${this.{core::_Enum::_name}{core::String}}"; } class Final extends core::_Enum /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::Final v = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::Final : super core::_Enum::•(#index, #name) ; @@ -44,8 +44,8 @@ class Final extends core::_Enum /*isEnum*/ { return "Final.${this.{core::_Enum::_name}{core::String}}"; } class Interface extends core::_Enum /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::Interface v = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::Interface : super core::_Enum::•(#index, #name) ; @@ -53,8 +53,8 @@ class Interface extends core::_Enum /*isEnum*/ { return "Interface.${this.{core::_Enum::_name}{core::String}}"; } class Sealed extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::Sealed v = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::Sealed : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/class_modifiers/invalid_enum_modifiers.dart.strong.modular.expect b/pkg/front_end/testcases/class_modifiers/invalid_enum_modifiers.dart.strong.modular.expect index 632b56f15044..e78d9086889f 100644 --- a/pkg/front_end/testcases/class_modifiers/invalid_enum_modifiers.dart.strong.modular.expect +++ b/pkg/front_end/testcases/class_modifiers/invalid_enum_modifiers.dart.strong.modular.expect @@ -26,8 +26,8 @@ import self as self; import "dart:core" as core; class Base extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::Base v = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::Base : super core::_Enum::•(#index, #name) ; @@ -35,8 +35,8 @@ class Base extends core::_Enum /*isEnum*/ { return "Base.${this.{core::_Enum::_name}{core::String}}"; } class Final extends core::_Enum /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::Final v = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::Final : super core::_Enum::•(#index, #name) ; @@ -44,8 +44,8 @@ class Final extends core::_Enum /*isEnum*/ { return "Final.${this.{core::_Enum::_name}{core::String}}"; } class Interface extends core::_Enum /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::Interface v = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::Interface : super core::_Enum::•(#index, #name) ; @@ -53,8 +53,8 @@ class Interface extends core::_Enum /*isEnum*/ { return "Interface.${this.{core::_Enum::_name}{core::String}}"; } class Sealed extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::Sealed v = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::Sealed : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/class_modifiers/invalid_enum_modifiers.dart.strong.outline.expect b/pkg/front_end/testcases/class_modifiers/invalid_enum_modifiers.dart.strong.outline.expect index 87424ad40882..04934cfafb2b 100644 --- a/pkg/front_end/testcases/class_modifiers/invalid_enum_modifiers.dart.strong.outline.expect +++ b/pkg/front_end/testcases/class_modifiers/invalid_enum_modifiers.dart.strong.outline.expect @@ -26,8 +26,8 @@ import self as self; import "dart:core" as core; class Base extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::Base::v]; enum-element static const field self::Base v = const self::Base::•(0, "v"); + static const field core::List values = const [self::Base::v]; const synthetic constructor •(core::int #index, core::String #name) → self::Base : super core::_Enum::•(#index, #name) ; @@ -35,8 +35,8 @@ class Base extends core::_Enum /*isEnum*/ { return "Base.${this.{core::_Enum::_name}{core::String}}"; } class Final extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::Final::v]; enum-element static const field self::Final v = const self::Final::•(0, "v"); + static const field core::List values = const [self::Final::v]; const synthetic constructor •(core::int #index, core::String #name) → self::Final : super core::_Enum::•(#index, #name) ; @@ -44,8 +44,8 @@ class Final extends core::_Enum /*isEnum*/ { return "Final.${this.{core::_Enum::_name}{core::String}}"; } class Interface extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::Interface::v]; enum-element static const field self::Interface v = const self::Interface::•(0, "v"); + static const field core::List values = const [self::Interface::v]; const synthetic constructor •(core::int #index, core::String #name) → self::Interface : super core::_Enum::•(#index, #name) ; @@ -53,8 +53,8 @@ class Interface extends core::_Enum /*isEnum*/ { return "Interface.${this.{core::_Enum::_name}{core::String}}"; } class Sealed extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::Sealed::v]; enum-element static const field self::Sealed v = const self::Sealed::•(0, "v"); + static const field core::List values = const [self::Sealed::v]; const synthetic constructor •(core::int #index, core::String #name) → self::Sealed : super core::_Enum::•(#index, #name) ; @@ -64,12 +64,12 @@ class Sealed extends core::_Enum /*isEnum*/ { Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///invalid_enum_modifiers.dart:5:11 -> ListConstant(const [const Base{_Enum.index: 0, _Enum._name: "v"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///invalid_enum_modifiers.dart:5:18 -> InstanceConstant(const Base{_Enum.index: 0, _Enum._name: "v"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///invalid_enum_modifiers.dart:6:12 -> ListConstant(const [const Final{_Enum.index: 0, _Enum._name: "v"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///invalid_enum_modifiers.dart:5:11 -> ListConstant(const [const Base{_Enum.index: 0, _Enum._name: "v"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///invalid_enum_modifiers.dart:6:20 -> InstanceConstant(const Final{_Enum.index: 0, _Enum._name: "v"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///invalid_enum_modifiers.dart:7:16 -> ListConstant(const [const Interface{_Enum.index: 0, _Enum._name: "v"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///invalid_enum_modifiers.dart:6:12 -> ListConstant(const [const Final{_Enum.index: 0, _Enum._name: "v"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///invalid_enum_modifiers.dart:7:28 -> InstanceConstant(const Interface{_Enum.index: 0, _Enum._name: "v"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///invalid_enum_modifiers.dart:8:13 -> ListConstant(const [const Sealed{_Enum.index: 0, _Enum._name: "v"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///invalid_enum_modifiers.dart:7:16 -> ListConstant(const [const Interface{_Enum.index: 0, _Enum._name: "v"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///invalid_enum_modifiers.dart:8:22 -> InstanceConstant(const Sealed{_Enum.index: 0, _Enum._name: "v"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///invalid_enum_modifiers.dart:8:13 -> ListConstant(const [const Sealed{_Enum.index: 0, _Enum._name: "v"}]) Extra constant evaluation: evaluated: 28, effectively constant: 8 diff --git a/pkg/front_end/testcases/class_modifiers/invalid_enum_modifiers.dart.strong.transformed.expect b/pkg/front_end/testcases/class_modifiers/invalid_enum_modifiers.dart.strong.transformed.expect index 632b56f15044..e78d9086889f 100644 --- a/pkg/front_end/testcases/class_modifiers/invalid_enum_modifiers.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/class_modifiers/invalid_enum_modifiers.dart.strong.transformed.expect @@ -26,8 +26,8 @@ import self as self; import "dart:core" as core; class Base extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::Base v = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::Base : super core::_Enum::•(#index, #name) ; @@ -35,8 +35,8 @@ class Base extends core::_Enum /*isEnum*/ { return "Base.${this.{core::_Enum::_name}{core::String}}"; } class Final extends core::_Enum /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::Final v = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::Final : super core::_Enum::•(#index, #name) ; @@ -44,8 +44,8 @@ class Final extends core::_Enum /*isEnum*/ { return "Final.${this.{core::_Enum::_name}{core::String}}"; } class Interface extends core::_Enum /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::Interface v = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::Interface : super core::_Enum::•(#index, #name) ; @@ -53,8 +53,8 @@ class Interface extends core::_Enum /*isEnum*/ { return "Interface.${this.{core::_Enum::_name}{core::String}}"; } class Sealed extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::Sealed v = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::Sealed : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/coverage/from_co19/built_in_identifier_A02_t02.dart.strong.expect b/pkg/front_end/testcases/coverage/from_co19/built_in_identifier_A02_t02.dart.strong.expect index 1a9a9f6afa0e..e58f89183336 100644 --- a/pkg/front_end/testcases/coverage/from_co19/built_in_identifier_A02_t02.dart.strong.expect +++ b/pkg/front_end/testcases/coverage/from_co19/built_in_identifier_A02_t02.dart.strong.expect @@ -51,8 +51,8 @@ class C extends core::Object { abstract class M extends core::Object /*isMixinDeclaration*/ { } class E extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C4; enum-element static const field self::E e1 = #C3; + static const field core::List> values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/coverage/from_co19/built_in_identifier_A02_t02.dart.strong.modular.expect b/pkg/front_end/testcases/coverage/from_co19/built_in_identifier_A02_t02.dart.strong.modular.expect index 1a9a9f6afa0e..e58f89183336 100644 --- a/pkg/front_end/testcases/coverage/from_co19/built_in_identifier_A02_t02.dart.strong.modular.expect +++ b/pkg/front_end/testcases/coverage/from_co19/built_in_identifier_A02_t02.dart.strong.modular.expect @@ -51,8 +51,8 @@ class C extends core::Object { abstract class M extends core::Object /*isMixinDeclaration*/ { } class E extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C4; enum-element static const field self::E e1 = #C3; + static const field core::List> values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/coverage/from_co19/built_in_identifier_A02_t02.dart.strong.outline.expect b/pkg/front_end/testcases/coverage/from_co19/built_in_identifier_A02_t02.dart.strong.outline.expect index dfed1c677fc6..dac2dafc032e 100644 --- a/pkg/front_end/testcases/coverage/from_co19/built_in_identifier_A02_t02.dart.strong.outline.expect +++ b/pkg/front_end/testcases/coverage/from_co19/built_in_identifier_A02_t02.dart.strong.outline.expect @@ -50,8 +50,8 @@ class C extends core::Object { abstract class M extends core::Object /*isMixinDeclaration*/ { } class E extends core::_Enum /*isEnum*/ { - static const field core::List> values = const >[self::E::e1]; enum-element static const field self::E e1 = const self::E::•(0, "e1"); + static const field core::List> values = const >[self::E::e1]; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; @@ -66,6 +66,6 @@ static method foo() → void Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///built_in_identifier_A02_t02.dart:14:6 -> ListConstant(const >[const E{_Enum.index: 0, _Enum._name: "e1"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///built_in_identifier_A02_t02.dart:16:3 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "e1"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///built_in_identifier_A02_t02.dart:14:6 -> ListConstant(const >[const E{_Enum.index: 0, _Enum._name: "e1"}]) Extra constant evaluation: evaluated: 7, effectively constant: 2 diff --git a/pkg/front_end/testcases/coverage/from_co19/built_in_identifier_A02_t02.dart.strong.transformed.expect b/pkg/front_end/testcases/coverage/from_co19/built_in_identifier_A02_t02.dart.strong.transformed.expect index 1a9a9f6afa0e..e58f89183336 100644 --- a/pkg/front_end/testcases/coverage/from_co19/built_in_identifier_A02_t02.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/coverage/from_co19/built_in_identifier_A02_t02.dart.strong.transformed.expect @@ -51,8 +51,8 @@ class C extends core::Object { abstract class M extends core::Object /*isMixinDeclaration*/ { } class E extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C4; enum-element static const field self::E e1 = #C3; + static const field core::List> values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/dart2js/enum_from_environment.dart.strong.expect b/pkg/front_end/testcases/dart2js/enum_from_environment.dart.strong.expect index cab552b55565..c2fe89e33a83 100644 --- a/pkg/front_end/testcases/dart2js/enum_from_environment.dart.strong.expect +++ b/pkg/front_end/testcases/dart2js/enum_from_environment.dart.strong.expect @@ -3,10 +3,10 @@ import self as self; import "dart:core" as core; class A extends core::_Enum /*isEnum*/ { + enum-element static const field self::A a = #C5; + enum-element static const field self::A b = #C10; final field self::B value; static const field core::List values = #C13; - enum-element static const field self::A a = #C5; - enum-element static const field self::A b = #C11; const constructor •(core::int #index, core::String #name, self::B value) → self::A : self::A::value = value, super core::_Enum::•(#index, #name) ; @@ -18,7 +18,7 @@ class A extends core::_Enum /*isEnum*/ { class B extends core::Object /*hasConstConstructor*/ { final field core::int value; static const field self::B a = #C3; - static const field self::B b = #C9; + static const field self::B b = #C8; const constructor •(core::int value) → self::B : self::B::value = value, super core::Object::•() ; @@ -34,7 +34,7 @@ static method method(self::A a) → core::String { return "a"; } #L3: - case #C11: + case #C10: { return "b"; } @@ -47,14 +47,14 @@ constants { #C3 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::B{value:#C2} #C4 = 0.0 #C5 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::A{value:#C3, index:#C4, _name:#C1} - #C6 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const [#C5] - #C7 = "b" - #C8 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const core::int::fromEnvironment(#C7) - #C9 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::B{value:#C8} - #C10 = 1.0 - #C11 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::A{value:#C9, index:#C10, _name:#C7} - #C12 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const [#C11] - #C13 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ #C6 + #C12 + #C6 = "b" + #C7 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const core::int::fromEnvironment(#C6) + #C8 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::B{value:#C7} + #C9 = 1.0 + #C10 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::A{value:#C8, index:#C9, _name:#C6} + #C11 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const [#C5] + #C12 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const [#C10] + #C13 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ #C11 + #C12 } diff --git a/pkg/front_end/testcases/dart2js/enum_from_environment.dart.strong.modular.expect b/pkg/front_end/testcases/dart2js/enum_from_environment.dart.strong.modular.expect index cab552b55565..c2fe89e33a83 100644 --- a/pkg/front_end/testcases/dart2js/enum_from_environment.dart.strong.modular.expect +++ b/pkg/front_end/testcases/dart2js/enum_from_environment.dart.strong.modular.expect @@ -3,10 +3,10 @@ import self as self; import "dart:core" as core; class A extends core::_Enum /*isEnum*/ { + enum-element static const field self::A a = #C5; + enum-element static const field self::A b = #C10; final field self::B value; static const field core::List values = #C13; - enum-element static const field self::A a = #C5; - enum-element static const field self::A b = #C11; const constructor •(core::int #index, core::String #name, self::B value) → self::A : self::A::value = value, super core::_Enum::•(#index, #name) ; @@ -18,7 +18,7 @@ class A extends core::_Enum /*isEnum*/ { class B extends core::Object /*hasConstConstructor*/ { final field core::int value; static const field self::B a = #C3; - static const field self::B b = #C9; + static const field self::B b = #C8; const constructor •(core::int value) → self::B : self::B::value = value, super core::Object::•() ; @@ -34,7 +34,7 @@ static method method(self::A a) → core::String { return "a"; } #L3: - case #C11: + case #C10: { return "b"; } @@ -47,14 +47,14 @@ constants { #C3 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::B{value:#C2} #C4 = 0.0 #C5 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::A{value:#C3, index:#C4, _name:#C1} - #C6 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const [#C5] - #C7 = "b" - #C8 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const core::int::fromEnvironment(#C7) - #C9 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::B{value:#C8} - #C10 = 1.0 - #C11 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::A{value:#C9, index:#C10, _name:#C7} - #C12 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const [#C11] - #C13 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ #C6 + #C12 + #C6 = "b" + #C7 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const core::int::fromEnvironment(#C6) + #C8 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::B{value:#C7} + #C9 = 1.0 + #C10 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::A{value:#C8, index:#C9, _name:#C6} + #C11 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const [#C5] + #C12 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const [#C10] + #C13 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ #C11 + #C12 } diff --git a/pkg/front_end/testcases/dart2js/enum_from_environment.dart.strong.outline.expect b/pkg/front_end/testcases/dart2js/enum_from_environment.dart.strong.outline.expect index 61d535844af2..82853811e4dc 100644 --- a/pkg/front_end/testcases/dart2js/enum_from_environment.dart.strong.outline.expect +++ b/pkg/front_end/testcases/dart2js/enum_from_environment.dart.strong.outline.expect @@ -3,10 +3,10 @@ import self as self; import "dart:core" as core; class A extends core::_Enum /*isEnum*/ { - final field self::B value; - static const field core::List values = const [self::A::a, self::A::b]; enum-element static const field self::A a = const self::A::•(0, "a", self::B::a); enum-element static const field self::A b = const self::A::•(1, "b", self::B::b); + final field self::B value; + static const field core::List values = const [self::A::a, self::A::b]; const constructor •(core::int #index, core::String #name, self::B value) → self::A : self::A::value = value, super core::_Enum::•(#index, #name) ; @@ -30,13 +30,13 @@ static method method(self::A a) → core::String Extra constant evaluation status: -Evaluated with empty environment: ListLiteral @ org-dartlang-testcase:///enum_from_environment.dart:5:6 -> ListConstant(const [const A{A.value: const B{B.value: 0.0}, _Enum.index: 0.0, _Enum._name: "a"}, const A{A.value: const B{B.value: 0.0}, _Enum.index: 1.0, _Enum._name: "b"}]) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///enum_from_environment.dart:5:6 -> InstanceConstant(const A{A.value: const B{B.value: 0.0}, _Enum.index: 0.0, _Enum._name: "a"}) -Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///enum_from_environment.dart:5:6 -> InstanceConstant(const A{A.value: const B{B.value: 0.0}, _Enum.index: 1.0, _Enum._name: "b"}) Evaluated with empty environment: ConstructorInvocation @ org-dartlang-testcase:///enum_from_environment.dart:6:3 -> InstanceConstant(const A{A.value: const B{B.value: 0.0}, _Enum.index: 0.0, _Enum._name: "a"}) Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///enum_from_environment.dart:6:7 -> InstanceConstant(const B{B.value: 0.0}) Evaluated with empty environment: ConstructorInvocation @ org-dartlang-testcase:///enum_from_environment.dart:7:3 -> InstanceConstant(const A{A.value: const B{B.value: 0.0}, _Enum.index: 1.0, _Enum._name: "b"}) Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///enum_from_environment.dart:7:7 -> InstanceConstant(const B{B.value: 0.0}) +Evaluated with empty environment: ListLiteral @ org-dartlang-testcase:///enum_from_environment.dart:5:6 -> ListConstant(const [const A{A.value: const B{B.value: 0.0}, _Enum.index: 0.0, _Enum._name: "a"}, const A{A.value: const B{B.value: 0.0}, _Enum.index: 1.0, _Enum._name: "b"}]) +Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///enum_from_environment.dart:5:6 -> InstanceConstant(const A{A.value: const B{B.value: 0.0}, _Enum.index: 0.0, _Enum._name: "a"}) +Evaluated with empty environment: StaticGet @ org-dartlang-testcase:///enum_from_environment.dart:5:6 -> InstanceConstant(const A{A.value: const B{B.value: 0.0}, _Enum.index: 1.0, _Enum._name: "b"}) Evaluated with empty environment: ConstructorInvocation @ org-dartlang-testcase:///enum_from_environment.dart:20:28 -> InstanceConstant(const B{B.value: 0.0}) Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///enum_from_environment.dart:20:36 -> DoubleConstant(0.0) Evaluated with empty environment: ConstructorInvocation @ org-dartlang-testcase:///enum_from_environment.dart:21:28 -> InstanceConstant(const B{B.value: 0.0}) diff --git a/pkg/front_end/testcases/dart2js/enum_from_environment.dart.strong.transformed.expect b/pkg/front_end/testcases/dart2js/enum_from_environment.dart.strong.transformed.expect index 43a1af396238..6ed528a0be7c 100644 --- a/pkg/front_end/testcases/dart2js/enum_from_environment.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/dart2js/enum_from_environment.dart.strong.transformed.expect @@ -3,10 +3,10 @@ import self as self; import "dart:core" as core; class A extends core::_Enum /*isEnum*/ { + enum-element static const field self::A a = #C5; + enum-element static const field self::A b = #C10; final field self::B value; static const field core::List values = #C13; - enum-element static const field self::A a = #C5; - enum-element static const field self::A b = #C11; const constructor •(core::int #index, core::String #name, self::B value) → self::A : self::A::value = value, super core::_Enum::•(#index, #name) ; @@ -18,7 +18,7 @@ class A extends core::_Enum /*isEnum*/ { class B extends core::Object /*hasConstConstructor*/ { final field core::int value; static const field self::B a = #C3; - static const field self::B b = #C9; + static const field self::B b = #C8; const constructor •(core::int value) → self::B : self::B::value = value, super core::Object::•() ; @@ -34,7 +34,7 @@ static method method(self::A a) → core::String { return "a"; } #L3: - case #C11: + case #C10: { return "b"; } @@ -47,20 +47,20 @@ constants { #C3 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::B{value:#C2} #C4 = 0.0 #C5 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::A{value:#C3, index:#C4, _name:#C1} - #C6 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const [#C5] - #C7 = "b" - #C8 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const core::int::fromEnvironment(#C7) - #C9 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::B{value:#C8} - #C10 = 1.0 - #C11 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::A{value:#C9, index:#C10, _name:#C7} - #C12 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const [#C11] - #C13 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ #C6 + #C12 + #C6 = "b" + #C7 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const core::int::fromEnvironment(#C6) + #C8 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::B{value:#C7} + #C9 = 1.0 + #C10 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::A{value:#C8, index:#C9, _name:#C6} + #C11 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const [#C5] + #C12 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const [#C10] + #C13 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ #C11 + #C12 } Extra constant evaluation status: -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///enum_from_environment.dart:5:6 -> ListConstant(const [const A{A.value: const B{B.value: 0.0}, _Enum.index: 0.0, _Enum._name: "a"}, const A{A.value: const B{B.value: 0.0}, _Enum.index: 1.0, _Enum._name: "b"}]) Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///enum_from_environment.dart:6:3 -> InstanceConstant(const A{A.value: const B{B.value: 0.0}, _Enum.index: 0.0, _Enum._name: "a"}) Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///enum_from_environment.dart:7:3 -> InstanceConstant(const A{A.value: const B{B.value: 0.0}, _Enum.index: 1.0, _Enum._name: "b"}) +Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///enum_from_environment.dart:5:6 -> ListConstant(const [const A{A.value: const B{B.value: 0.0}, _Enum.index: 0.0, _Enum._name: "a"}, const A{A.value: const B{B.value: 0.0}, _Enum.index: 1.0, _Enum._name: "b"}]) Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///enum_from_environment.dart:20:28 -> InstanceConstant(const B{B.value: 0.0}) Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///enum_from_environment.dart:21:28 -> InstanceConstant(const B{B.value: 0.0}) Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///enum_from_environment.dart:26:12 -> InstanceConstant(const A{A.value: const B{B.value: 0.0}, _Enum.index: 0.0, _Enum._name: "a"}) diff --git a/pkg/front_end/testcases/dart2js/enum_from_environment.dart.weak.expect b/pkg/front_end/testcases/dart2js/enum_from_environment.dart.weak.expect index 870de6b1ff84..6d36286b5cae 100644 --- a/pkg/front_end/testcases/dart2js/enum_from_environment.dart.weak.expect +++ b/pkg/front_end/testcases/dart2js/enum_from_environment.dart.weak.expect @@ -4,10 +4,10 @@ import "dart:core" as core; import "dart:_internal" as _in; class A extends core::_Enum /*isEnum*/ { + enum-element static const field self::A a = #C5; + enum-element static const field self::A b = #C10; final field self::B value; static const field core::List values = #C13; - enum-element static const field self::A a = #C5; - enum-element static const field self::A b = #C11; const constructor •(core::int #index, core::String #name, self::B value) → self::A : self::A::value = value, super core::_Enum::•(#index, #name) ; @@ -19,7 +19,7 @@ class A extends core::_Enum /*isEnum*/ { class B extends core::Object /*hasConstConstructor*/ { final field core::int value; static const field self::B a = #C3; - static const field self::B b = #C9; + static const field self::B b = #C8; const constructor •(core::int value) → self::B : self::B::value = value, super core::Object::•() ; @@ -35,7 +35,7 @@ static method method(self::A a) → core::String { return "a"; } #L3: - case #C11: + case #C10: { return "b"; } @@ -51,14 +51,14 @@ constants { #C3 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::B{value:#C2} #C4 = 0.0 #C5 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::A{value:#C3, index:#C4, _name:#C1} - #C6 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const [#C5] - #C7 = "b" - #C8 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const core::int::fromEnvironment(#C7) - #C9 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::B{value:#C8} - #C10 = 1.0 - #C11 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::A{value:#C9, index:#C10, _name:#C7} - #C12 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const [#C11] - #C13 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ #C6 + #C12 + #C6 = "b" + #C7 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const core::int::fromEnvironment(#C6) + #C8 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::B{value:#C7} + #C9 = 1.0 + #C10 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::A{value:#C8, index:#C9, _name:#C6} + #C11 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const [#C5] + #C12 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const [#C10] + #C13 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ #C11 + #C12 } diff --git a/pkg/front_end/testcases/dart2js/enum_from_environment.dart.weak.transformed.expect b/pkg/front_end/testcases/dart2js/enum_from_environment.dart.weak.transformed.expect index cb8e4ccf2d0d..aa2b63de4850 100644 --- a/pkg/front_end/testcases/dart2js/enum_from_environment.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/dart2js/enum_from_environment.dart.weak.transformed.expect @@ -4,10 +4,10 @@ import "dart:core" as core; import "dart:_internal" as _in; class A extends core::_Enum /*isEnum*/ { + enum-element static const field self::A a = #C5; + enum-element static const field self::A b = #C10; final field self::B value; static const field core::List values = #C13; - enum-element static const field self::A a = #C5; - enum-element static const field self::A b = #C11; const constructor •(core::int #index, core::String #name, self::B value) → self::A : self::A::value = value, super core::_Enum::•(#index, #name) ; @@ -19,7 +19,7 @@ class A extends core::_Enum /*isEnum*/ { class B extends core::Object /*hasConstConstructor*/ { final field core::int value; static const field self::B a = #C3; - static const field self::B b = #C9; + static const field self::B b = #C8; const constructor •(core::int value) → self::B : self::B::value = value, super core::Object::•() ; @@ -35,7 +35,7 @@ static method method(self::A a) → core::String { return "a"; } #L3: - case #C11: + case #C10: { return "b"; } @@ -51,20 +51,20 @@ constants { #C3 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::B{value:#C2} #C4 = 0.0 #C5 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::A{value:#C3, index:#C4, _name:#C1} - #C6 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const [#C5] - #C7 = "b" - #C8 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const core::int::fromEnvironment(#C7) - #C9 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::B{value:#C8} - #C10 = 1.0 - #C11 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::A{value:#C9, index:#C10, _name:#C7} - #C12 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const [#C11] - #C13 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ #C6 + #C12 + #C6 = "b" + #C7 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const core::int::fromEnvironment(#C6) + #C8 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::B{value:#C7} + #C9 = 1.0 + #C10 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::A{value:#C8, index:#C9, _name:#C6} + #C11 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const [#C5] + #C12 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const [#C10] + #C13 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ #C11 + #C12 } Extra constant evaluation status: -Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///enum_from_environment.dart:5:6 -> ListConstant(const [const A{A.value: const B{B.value: 0.0}, _Enum.index: 0.0, _Enum._name: "a"}, const A{A.value: const B{B.value: 0.0}, _Enum.index: 1.0, _Enum._name: "b"}]) Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///enum_from_environment.dart:6:3 -> InstanceConstant(const A{A.value: const B{B.value: 0.0}, _Enum.index: 0.0, _Enum._name: "a"}) Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///enum_from_environment.dart:7:3 -> InstanceConstant(const A{A.value: const B{B.value: 0.0}, _Enum.index: 1.0, _Enum._name: "b"}) +Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///enum_from_environment.dart:5:6 -> ListConstant(const [const A{A.value: const B{B.value: 0.0}, _Enum.index: 0.0, _Enum._name: "a"}, const A{A.value: const B{B.value: 0.0}, _Enum.index: 1.0, _Enum._name: "b"}]) Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///enum_from_environment.dart:20:28 -> InstanceConstant(const B{B.value: 0.0}) Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///enum_from_environment.dart:21:28 -> InstanceConstant(const B{B.value: 0.0}) Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///enum_from_environment.dart:26:12 -> InstanceConstant(const A{A.value: const B{B.value: 0.0}, _Enum.index: 0.0, _Enum._name: "a"}) diff --git a/pkg/front_end/testcases/dart2js/issue51823.dart.strong.expect b/pkg/front_end/testcases/dart2js/issue51823.dart.strong.expect index e54b7ccbf938..5182bf760d75 100644 --- a/pkg/front_end/testcases/dart2js/issue51823.dart.strong.expect +++ b/pkg/front_end/testcases/dart2js/issue51823.dart.strong.expect @@ -11,9 +11,9 @@ import self as iss; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C12; enum-element static const field iss::E a = #C10; enum-element static const field iss::E b = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → iss::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/dart2js/issue51823.dart.strong.modular.expect b/pkg/front_end/testcases/dart2js/issue51823.dart.strong.modular.expect index e54b7ccbf938..5182bf760d75 100644 --- a/pkg/front_end/testcases/dart2js/issue51823.dart.strong.modular.expect +++ b/pkg/front_end/testcases/dart2js/issue51823.dart.strong.modular.expect @@ -11,9 +11,9 @@ import self as iss; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C12; enum-element static const field iss::E a = #C10; enum-element static const field iss::E b = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → iss::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/dart2js/issue51823.dart.strong.outline.expect b/pkg/front_end/testcases/dart2js/issue51823.dart.strong.outline.expect index d3faf8f8c69e..c47f13916595 100644 --- a/pkg/front_end/testcases/dart2js/issue51823.dart.strong.outline.expect +++ b/pkg/front_end/testcases/dart2js/issue51823.dart.strong.outline.expect @@ -12,9 +12,9 @@ import self as iss; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = const [iss::E::a, iss::E::b]; enum-element static const field iss::E a = const iss::E::•(0, "a"); enum-element static const field iss::E b = const iss::E::•(1, "b"); + static const field core::List values = const [iss::E::a, iss::E::b]; const synthetic constructor •(core::int #index, core::String #name) → iss::E : super core::_Enum::•(#index, #name) ; @@ -30,7 +30,7 @@ Evaluated with empty environment: ConditionalExpression @ org-dartlang-testcase: Evaluated with empty environment: FactoryConstructorInvocation @ org-dartlang-testcase:///issue51823.dart:7:17 -> BoolConstant(false) Evaluated: StaticGet @ org-dartlang-testcase:///issue51823.dart:7:49 -> InstanceConstant(const E{_Enum.index: 0.0, _Enum._name: "a"}) Evaluated: StaticGet @ org-dartlang-testcase:///issue51823.dart:7:55 -> InstanceConstant(const E{_Enum.index: 1.0, _Enum._name: "b"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///issue51823_lib.dart:5:6 -> ListConstant(const [const E{_Enum.index: 0.0, _Enum._name: "a"}, const E{_Enum.index: 1.0, _Enum._name: "b"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue51823_lib.dart:5:10 -> InstanceConstant(const E{_Enum.index: 0.0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue51823_lib.dart:5:13 -> InstanceConstant(const E{_Enum.index: 1.0, _Enum._name: "b"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///issue51823_lib.dart:5:6 -> ListConstant(const [const E{_Enum.index: 0.0, _Enum._name: "a"}, const E{_Enum.index: 1.0, _Enum._name: "b"}]) Extra constant evaluation: evaluated: 12, effectively constant: 7 diff --git a/pkg/front_end/testcases/dart2js/issue51823.dart.strong.transformed.expect b/pkg/front_end/testcases/dart2js/issue51823.dart.strong.transformed.expect index c26dc0a979bb..77ffa26e3078 100644 --- a/pkg/front_end/testcases/dart2js/issue51823.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/dart2js/issue51823.dart.strong.transformed.expect @@ -11,9 +11,9 @@ import self as iss; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C12; enum-element static const field iss::E a = #C10; enum-element static const field iss::E b = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → iss::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/dart2js/issue51823.dart.weak.expect b/pkg/front_end/testcases/dart2js/issue51823.dart.weak.expect index df120906fdec..68ffd18176b5 100644 --- a/pkg/front_end/testcases/dart2js/issue51823.dart.weak.expect +++ b/pkg/front_end/testcases/dart2js/issue51823.dart.weak.expect @@ -12,9 +12,9 @@ import "dart:core" as core; import "dart:_internal" as _in; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C12; enum-element static const field iss::E a = #C10; enum-element static const field iss::E b = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → iss::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/dart2js/issue51823.dart.weak.transformed.expect b/pkg/front_end/testcases/dart2js/issue51823.dart.weak.transformed.expect index 41c696942560..cfda8c84a4f9 100644 --- a/pkg/front_end/testcases/dart2js/issue51823.dart.weak.transformed.expect +++ b/pkg/front_end/testcases/dart2js/issue51823.dart.weak.transformed.expect @@ -12,9 +12,9 @@ import "dart:core" as core; import "dart:_internal" as _in; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C12; enum-element static const field iss::E a = #C10; enum-element static const field iss::E b = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → iss::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/dartdevc/issue56681/main.dart.strong.expect b/pkg/front_end/testcases/dartdevc/issue56681/main.dart.strong.expect index 157713b837b4..4e0f82704fe5 100644 --- a/pkg/front_end/testcases/dartdevc/issue56681/main.dart.strong.expect +++ b/pkg/front_end/testcases/dartdevc/issue56681/main.dart.strong.expect @@ -27,8 +27,8 @@ abstract class _SomeEnum&_Enum&HasSomeField = core::_Enum with mai::HasSomeField abstract mixin-stub get someField() → core::String; -> mai::HasSomeField::someField } class SomeEnum extends mai::_SomeEnum&_Enum&HasSomeField /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field mai::SomeEnum value = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → mai::SomeEnum : super mai::_SomeEnum&_Enum&HasSomeField::•(#index, #name) ; diff --git a/pkg/front_end/testcases/dartdevc/issue56681/main.dart.strong.outline.expect b/pkg/front_end/testcases/dartdevc/issue56681/main.dart.strong.outline.expect index 017c043db323..462f4a68d249 100644 --- a/pkg/front_end/testcases/dartdevc/issue56681/main.dart.strong.outline.expect +++ b/pkg/front_end/testcases/dartdevc/issue56681/main.dart.strong.outline.expect @@ -20,8 +20,8 @@ abstract class _SomeEnum&_Enum&HasSomeField = core::_Enum with self2::HasSomeFie abstract mixin-stub get someField() → core::String; -> self2::HasSomeField::someField } class SomeEnum extends self2::_SomeEnum&_Enum&HasSomeField /*isEnum*/ { - static const field core::List values = const [self2::SomeEnum::value]; enum-element static const field self2::SomeEnum value = const self2::SomeEnum::•(0, "value"); + static const field core::List values = const [self2::SomeEnum::value]; const synthetic constructor •(core::int #index, core::String #name) → self2::SomeEnum : super self2::_SomeEnum&_Enum&HasSomeField::•(#index, #name) ; @@ -35,6 +35,6 @@ class SomeEnum extends self2::_SomeEnum&_Enum&HasSomeField /*isEnum*/ { Extra constant evaluation status: Evaluated: StaticGet @ org-dartlang-testcase:///main_lib.dart:12:4 -> InstanceConstant(const _Override{}) -Evaluated: ListLiteral @ org-dartlang-testcase:///main_lib.dart:9:6 -> ListConstant(const [const SomeEnum{_Enum.index: 0.0, _Enum._name: "value"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main_lib.dart:10:3 -> InstanceConstant(const SomeEnum{_Enum.index: 0.0, _Enum._name: "value"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///main_lib.dart:9:6 -> ListConstant(const [const SomeEnum{_Enum.index: 0.0, _Enum._name: "value"}]) Extra constant evaluation: evaluated: 10, effectively constant: 3 diff --git a/pkg/front_end/testcases/dartdevc/issue56681/main.dart.strong.transformed.expect b/pkg/front_end/testcases/dartdevc/issue56681/main.dart.strong.transformed.expect index 1efdc937c5b9..973ade21f2e2 100644 --- a/pkg/front_end/testcases/dartdevc/issue56681/main.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/dartdevc/issue56681/main.dart.strong.transformed.expect @@ -27,8 +27,8 @@ abstract class _SomeEnum&_Enum&HasSomeField = core::_Enum with mai::HasSomeField abstract mixin-stub get someField() → core::String; -> mai::HasSomeField::someField } class SomeEnum extends mai::_SomeEnum&_Enum&HasSomeField /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field mai::SomeEnum value = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → mai::SomeEnum : super mai::_SomeEnum&_Enum&HasSomeField::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/abstract_members.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/abstract_members.dart.strong.expect index 51a467309947..be49cdb5902a 100644 --- a/pkg/front_end/testcases/enhanced_enums/abstract_members.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/abstract_members.dart.strong.expect @@ -60,8 +60,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E1 element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -70,8 +70,8 @@ class E1 extends core::_Enum /*isEnum*/ { abstract method foo() → void; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::E2 element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -80,8 +80,8 @@ class E2 extends core::_Enum /*isEnum*/ { abstract get foo() → core::int; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::E3 element = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -96,8 +96,8 @@ abstract class InterfaceMethod extends core::Object { abstract method foo() → void; } class E4 extends core::_Enum implements self::InterfaceMethod /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E4 element = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super core::_Enum::•(#index, #name) ; @@ -111,8 +111,8 @@ abstract class InterfaceGetter extends core::Object { abstract get foo() → core::int; } class E5 extends core::_Enum implements self::InterfaceGetter /*isEnum*/ { - static const field core::List values = #C12; enum-element static const field self::E5 element = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super core::_Enum::•(#index, #name) ; @@ -126,8 +126,8 @@ abstract class InterfaceSetter extends core::Object { abstract set foo(core::int val) → void; } class E6 extends core::_Enum implements self::InterfaceSetter /*isEnum*/ { - static const field core::List values = #C14; enum-element static const field self::E6 element = #C13; + static const field core::List values = #C14; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super core::_Enum::•(#index, #name) ; @@ -145,8 +145,8 @@ abstract class _E7&_Enum&MethodImplementation = core::_Enum with self::MethodImp return super.{self::MethodImplementation::foo}(); } class E7 extends self::_E7&_Enum&MethodImplementation /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field self::E7 element = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super self::_E7&_Enum&MethodImplementation::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/abstract_members.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/abstract_members.dart.strong.modular.expect index 51a467309947..be49cdb5902a 100644 --- a/pkg/front_end/testcases/enhanced_enums/abstract_members.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/abstract_members.dart.strong.modular.expect @@ -60,8 +60,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E1 element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -70,8 +70,8 @@ class E1 extends core::_Enum /*isEnum*/ { abstract method foo() → void; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::E2 element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -80,8 +80,8 @@ class E2 extends core::_Enum /*isEnum*/ { abstract get foo() → core::int; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::E3 element = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -96,8 +96,8 @@ abstract class InterfaceMethod extends core::Object { abstract method foo() → void; } class E4 extends core::_Enum implements self::InterfaceMethod /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E4 element = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super core::_Enum::•(#index, #name) ; @@ -111,8 +111,8 @@ abstract class InterfaceGetter extends core::Object { abstract get foo() → core::int; } class E5 extends core::_Enum implements self::InterfaceGetter /*isEnum*/ { - static const field core::List values = #C12; enum-element static const field self::E5 element = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super core::_Enum::•(#index, #name) ; @@ -126,8 +126,8 @@ abstract class InterfaceSetter extends core::Object { abstract set foo(core::int val) → void; } class E6 extends core::_Enum implements self::InterfaceSetter /*isEnum*/ { - static const field core::List values = #C14; enum-element static const field self::E6 element = #C13; + static const field core::List values = #C14; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super core::_Enum::•(#index, #name) ; @@ -145,8 +145,8 @@ abstract class _E7&_Enum&MethodImplementation = core::_Enum with self::MethodImp return super.{self::MethodImplementation::foo}(); } class E7 extends self::_E7&_Enum&MethodImplementation /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field self::E7 element = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super self::_E7&_Enum&MethodImplementation::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/abstract_members.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/abstract_members.dart.strong.outline.expect index 773015666ca0..a1e0b2167ebc 100644 --- a/pkg/front_end/testcases/enhanced_enums/abstract_members.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/abstract_members.dart.strong.outline.expect @@ -60,8 +60,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E1::element]; enum-element static const field self::E1 element = const self::E1::•(0, "element"); + static const field core::List values = const [self::E1::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -70,8 +70,8 @@ class E1 extends core::_Enum /*isEnum*/ { abstract method foo() → void; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E2::element]; enum-element static const field self::E2 element = const self::E2::•(0, "element"); + static const field core::List values = const [self::E2::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -80,8 +80,8 @@ class E2 extends core::_Enum /*isEnum*/ { abstract get foo() → core::int; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E3::element]; enum-element static const field self::E3 element = const self::E3::•(0, "element"); + static const field core::List values = const [self::E3::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -95,8 +95,8 @@ abstract class InterfaceMethod extends core::Object { abstract method foo() → void; } class E4 extends core::_Enum implements self::InterfaceMethod /*isEnum*/ { - static const field core::List values = const [self::E4::element]; enum-element static const field self::E4 element = const self::E4::•(0, "element"); + static const field core::List values = const [self::E4::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super core::_Enum::•(#index, #name) ; @@ -109,8 +109,8 @@ abstract class InterfaceGetter extends core::Object { abstract get foo() → core::int; } class E5 extends core::_Enum implements self::InterfaceGetter /*isEnum*/ { - static const field core::List values = const [self::E5::element]; enum-element static const field self::E5 element = const self::E5::•(0, "element"); + static const field core::List values = const [self::E5::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super core::_Enum::•(#index, #name) ; @@ -123,8 +123,8 @@ abstract class InterfaceSetter extends core::Object { abstract set foo(core::int val) → void; } class E6 extends core::_Enum implements self::InterfaceSetter /*isEnum*/ { - static const field core::List values = const [self::E6::element]; enum-element static const field self::E6 element = const self::E6::•(0, "element"); + static const field core::List values = const [self::E6::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super core::_Enum::•(#index, #name) ; @@ -143,8 +143,8 @@ abstract class _E7&_Enum&MethodImplementation = core::_Enum with self::MethodImp return super.{self::MethodImplementation::foo}(); } class E7 extends self::_E7&_Enum&MethodImplementation /*isEnum*/ { - static const field core::List values = const [self::E7::element]; enum-element static const field self::E7 element = const self::E7::•(0, "element"); + static const field core::List values = const [self::E7::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super self::_E7&_Enum&MethodImplementation::•(#index, #name) ; @@ -157,18 +157,18 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_members.dart:5:6 -> ListConstant(const [const E1{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///abstract_members.dart:6:3 -> InstanceConstant(const E1{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_members.dart:11:6 -> ListConstant(const [const E2{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_members.dart:5:6 -> ListConstant(const [const E1{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///abstract_members.dart:12:3 -> InstanceConstant(const E2{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_members.dart:17:6 -> ListConstant(const [const E3{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_members.dart:11:6 -> ListConstant(const [const E2{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///abstract_members.dart:18:3 -> InstanceConstant(const E3{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_members.dart:27:6 -> ListConstant(const [const E4{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_members.dart:17:6 -> ListConstant(const [const E3{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///abstract_members.dart:28:3 -> InstanceConstant(const E4{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_members.dart:35:6 -> ListConstant(const [const E5{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_members.dart:27:6 -> ListConstant(const [const E4{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///abstract_members.dart:36:3 -> InstanceConstant(const E5{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_members.dart:43:6 -> ListConstant(const [const E6{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_members.dart:35:6 -> ListConstant(const [const E5{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///abstract_members.dart:44:3 -> InstanceConstant(const E6{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_members.dart:51:6 -> ListConstant(const [const E7{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_members.dart:43:6 -> ListConstant(const [const E6{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///abstract_members.dart:52:3 -> InstanceConstant(const E7{_Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///abstract_members.dart:51:6 -> ListConstant(const [const E7{_Enum.index: 0, _Enum._name: "element"}]) Extra constant evaluation: evaluated: 52, effectively constant: 14 diff --git a/pkg/front_end/testcases/enhanced_enums/abstract_members.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/abstract_members.dart.strong.transformed.expect index bf58dbbb8e0b..7cb5655e9001 100644 --- a/pkg/front_end/testcases/enhanced_enums/abstract_members.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/abstract_members.dart.strong.transformed.expect @@ -60,8 +60,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E1 element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -70,8 +70,8 @@ class E1 extends core::_Enum /*isEnum*/ { abstract method foo() → void; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::E2 element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -80,8 +80,8 @@ class E2 extends core::_Enum /*isEnum*/ { abstract get foo() → core::int; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::E3 element = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -96,8 +96,8 @@ abstract class InterfaceMethod extends core::Object { abstract method foo() → void; } class E4 extends core::_Enum implements self::InterfaceMethod /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E4 element = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super core::_Enum::•(#index, #name) ; @@ -111,8 +111,8 @@ abstract class InterfaceGetter extends core::Object { abstract get foo() → core::int; } class E5 extends core::_Enum implements self::InterfaceGetter /*isEnum*/ { - static const field core::List values = #C12; enum-element static const field self::E5 element = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super core::_Enum::•(#index, #name) ; @@ -126,8 +126,8 @@ abstract class InterfaceSetter extends core::Object { abstract set foo(core::int val) → void; } class E6 extends core::_Enum implements self::InterfaceSetter /*isEnum*/ { - static const field core::List values = #C14; enum-element static const field self::E6 element = #C13; + static const field core::List values = #C14; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super core::_Enum::•(#index, #name) ; @@ -144,8 +144,8 @@ abstract class _E7&_Enum&MethodImplementation extends core::_Enum implements sel method foo() → void {} } class E7 extends self::_E7&_Enum&MethodImplementation /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field self::E7 element = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super self::_E7&_Enum&MethodImplementation::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart.strong.expect index 8f9e3dc8901b..5bb45ad0302e 100644 --- a/pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart.strong.expect @@ -37,6 +37,13 @@ library; // element; // ^^^^^^^ // +// pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart:37:12: Error: Instance property 'element' conflicts with static property of the same name. +// void set element(E6 value) {} +// ^^^^^^^ +// pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart:35:3: Context: Conflicting static property 'element'. +// element; // Error. +// ^^^^^^^ +// // pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart:35:3: Error: This static member conflicts with an instance member. // element; // Error. // ^^^^^^^ @@ -73,8 +80,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - final field core::int element = 42; - static const field core::List values = #C1; + enum-element static const field self::E1 element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -82,8 +89,8 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C5; - enum-element static const field self::E2 element = #C4; + enum-element static const field self::E2 element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -91,26 +98,26 @@ class E2 extends core::_Enum /*isEnum*/ { return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C6; + enum-element static const field self::E3 element = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; method _enumToString() → core::String return "E3.${this.{core::_Enum::_name}{core::String}}"; - method element() → void {} } class E4 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; + enum-element static const field self::E4 element = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super core::_Enum::•(#index, #name) ; method _enumToString() → core::String return "E4.${this.{core::_Enum::_name}{core::String}}"; - static method element() → void {} } class E5 extends core::_Enum /*isEnum*/ { - static field core::int element = 42; - static const field core::List values = #C8; + enum-element static const field self::E5 element = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super core::_Enum::•(#index, #name) ; @@ -118,8 +125,8 @@ class E5 extends core::_Enum /*isEnum*/ { return "E5.${this.{core::_Enum::_name}{core::String}}"; } class E6 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; - enum-element static const field self::E6 element = #C9; + enum-element static const field self::E6 element = #C13; + static const field core::List values = #C14; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super core::_Enum::•(#index, #name) ; @@ -128,8 +135,8 @@ class E6 extends core::_Enum /*isEnum*/ { set element(self::E6 value) → void {} } class E7 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C12; - enum-element static const field self::E7 element = #C11; + enum-element static const field self::E7 element = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super core::_Enum::•(#index, #name) ; @@ -148,8 +155,8 @@ abstract class _E8&_Enum&A8 = core::_Enum with self::A8 /*isAnonymousMixin,hasCo return super.{self::A8::element} = value; } class E8 extends self::_E8&_Enum&A8 /*isEnum*/ { - static const field core::List values = #C14; - enum-element static const field self::E8 element = #C13; + enum-element static const field self::E8 element = #C17; + static const field core::List values = #C18; const synthetic constructor •(core::int #index, core::String #name) → self::E8 : super self::_E8&_Enum&A8::•(#index, #name) ; @@ -169,8 +176,8 @@ abstract class _E9&_Enum&A9 = core::_Enum with self::A9 /*isAnonymousMixin*/ { return super.{self::A9::element}; } class E9 extends self::_E9&_Enum&A9 /*isEnum*/ { - static const field core::List values = invalid-expression "A constant constructor can't call a non-constant super constructor."; enum-element static const field self::E9 element = invalid-expression "A constant constructor can't call a non-constant super constructor."; + static const field core::List values = invalid-expression "A constant constructor can't call a non-constant super constructor."; const synthetic constructor •(core::int #index, core::String #name) → self::E9 : super self::_E9&_Enum&A9::•(#index, #name) ; @@ -188,8 +195,8 @@ abstract class _E10&_Enum&A10 = core::_Enum with self::A10 /*isAnonymousMixin,ha return super.{self::A10::element}(); } class E10 extends self::_E10&_Enum&A10 /*isEnum*/ { - static const field core::List values = #C16; - enum-element static const field self::E10 element = #C15; + enum-element static const field self::E10 element = #C19; + static const field core::List values = #C20; const synthetic constructor •(core::int #index, core::String #name) → self::E10 : super self::_E10&_Enum&A10::•(#index, #name) ; @@ -199,30 +206,38 @@ class E10 extends self::_E10&_Enum&A10 /*isEnum*/ { static method main() → dynamic {} constants { - #C1 = [] - #C2 = 0 - #C3 = "element" - #C4 = self::E2 {index:#C2, _name:#C3} - #C5 = [#C4] - #C6 = [] - #C7 = [] - #C8 = [] - #C9 = self::E6 {index:#C2, _name:#C3} - #C10 = [#C9] - #C11 = self::E7 {index:#C2, _name:#C3} - #C12 = [#C11] - #C13 = self::E8 {index:#C2, _name:#C3} - #C14 = [#C13] - #C15 = self::E10 {index:#C2, _name:#C3} - #C16 = [#C15] + #C1 = 0 + #C2 = "element" + #C3 = self::E1 {index:#C1, _name:#C2} + #C4 = [#C3] + #C5 = self::E2 {index:#C1, _name:#C2} + #C6 = [#C5] + #C7 = self::E3 {index:#C1, _name:#C2} + #C8 = [#C7] + #C9 = self::E4 {index:#C1, _name:#C2} + #C10 = [#C9] + #C11 = self::E5 {index:#C1, _name:#C2} + #C12 = [#C11] + #C13 = self::E6 {index:#C1, _name:#C2} + #C14 = [#C13] + #C15 = self::E7 {index:#C1, _name:#C2} + #C16 = [#C15] + #C17 = self::E8 {index:#C1, _name:#C2} + #C18 = [#C17] + #C19 = self::E10 {index:#C1, _name:#C2} + #C20 = [#C19] } Constructor coverage from constants: org-dartlang-testcase:///conflicting_elements.dart: -- E2. (from org-dartlang-testcase:///conflicting_elements.dart:11:6) +- E1. (from org-dartlang-testcase:///conflicting_elements.dart:5:6) - _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart) - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) +- E2. (from org-dartlang-testcase:///conflicting_elements.dart:11:6) +- E3. (from org-dartlang-testcase:///conflicting_elements.dart:16:6) +- E4. (from org-dartlang-testcase:///conflicting_elements.dart:22:6) +- E5. (from org-dartlang-testcase:///conflicting_elements.dart:28:6) - E6. (from org-dartlang-testcase:///conflicting_elements.dart:34:6) - E7. (from org-dartlang-testcase:///conflicting_elements.dart:40:6) - E8. (from org-dartlang-testcase:///conflicting_elements.dart:50:6) diff --git a/pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart.strong.modular.expect index 8f9e3dc8901b..5bb45ad0302e 100644 --- a/pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart.strong.modular.expect @@ -37,6 +37,13 @@ library; // element; // ^^^^^^^ // +// pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart:37:12: Error: Instance property 'element' conflicts with static property of the same name. +// void set element(E6 value) {} +// ^^^^^^^ +// pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart:35:3: Context: Conflicting static property 'element'. +// element; // Error. +// ^^^^^^^ +// // pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart:35:3: Error: This static member conflicts with an instance member. // element; // Error. // ^^^^^^^ @@ -73,8 +80,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - final field core::int element = 42; - static const field core::List values = #C1; + enum-element static const field self::E1 element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -82,8 +89,8 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C5; - enum-element static const field self::E2 element = #C4; + enum-element static const field self::E2 element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -91,26 +98,26 @@ class E2 extends core::_Enum /*isEnum*/ { return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C6; + enum-element static const field self::E3 element = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; method _enumToString() → core::String return "E3.${this.{core::_Enum::_name}{core::String}}"; - method element() → void {} } class E4 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; + enum-element static const field self::E4 element = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super core::_Enum::•(#index, #name) ; method _enumToString() → core::String return "E4.${this.{core::_Enum::_name}{core::String}}"; - static method element() → void {} } class E5 extends core::_Enum /*isEnum*/ { - static field core::int element = 42; - static const field core::List values = #C8; + enum-element static const field self::E5 element = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super core::_Enum::•(#index, #name) ; @@ -118,8 +125,8 @@ class E5 extends core::_Enum /*isEnum*/ { return "E5.${this.{core::_Enum::_name}{core::String}}"; } class E6 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; - enum-element static const field self::E6 element = #C9; + enum-element static const field self::E6 element = #C13; + static const field core::List values = #C14; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super core::_Enum::•(#index, #name) ; @@ -128,8 +135,8 @@ class E6 extends core::_Enum /*isEnum*/ { set element(self::E6 value) → void {} } class E7 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C12; - enum-element static const field self::E7 element = #C11; + enum-element static const field self::E7 element = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super core::_Enum::•(#index, #name) ; @@ -148,8 +155,8 @@ abstract class _E8&_Enum&A8 = core::_Enum with self::A8 /*isAnonymousMixin,hasCo return super.{self::A8::element} = value; } class E8 extends self::_E8&_Enum&A8 /*isEnum*/ { - static const field core::List values = #C14; - enum-element static const field self::E8 element = #C13; + enum-element static const field self::E8 element = #C17; + static const field core::List values = #C18; const synthetic constructor •(core::int #index, core::String #name) → self::E8 : super self::_E8&_Enum&A8::•(#index, #name) ; @@ -169,8 +176,8 @@ abstract class _E9&_Enum&A9 = core::_Enum with self::A9 /*isAnonymousMixin*/ { return super.{self::A9::element}; } class E9 extends self::_E9&_Enum&A9 /*isEnum*/ { - static const field core::List values = invalid-expression "A constant constructor can't call a non-constant super constructor."; enum-element static const field self::E9 element = invalid-expression "A constant constructor can't call a non-constant super constructor."; + static const field core::List values = invalid-expression "A constant constructor can't call a non-constant super constructor."; const synthetic constructor •(core::int #index, core::String #name) → self::E9 : super self::_E9&_Enum&A9::•(#index, #name) ; @@ -188,8 +195,8 @@ abstract class _E10&_Enum&A10 = core::_Enum with self::A10 /*isAnonymousMixin,ha return super.{self::A10::element}(); } class E10 extends self::_E10&_Enum&A10 /*isEnum*/ { - static const field core::List values = #C16; - enum-element static const field self::E10 element = #C15; + enum-element static const field self::E10 element = #C19; + static const field core::List values = #C20; const synthetic constructor •(core::int #index, core::String #name) → self::E10 : super self::_E10&_Enum&A10::•(#index, #name) ; @@ -199,30 +206,38 @@ class E10 extends self::_E10&_Enum&A10 /*isEnum*/ { static method main() → dynamic {} constants { - #C1 = [] - #C2 = 0 - #C3 = "element" - #C4 = self::E2 {index:#C2, _name:#C3} - #C5 = [#C4] - #C6 = [] - #C7 = [] - #C8 = [] - #C9 = self::E6 {index:#C2, _name:#C3} - #C10 = [#C9] - #C11 = self::E7 {index:#C2, _name:#C3} - #C12 = [#C11] - #C13 = self::E8 {index:#C2, _name:#C3} - #C14 = [#C13] - #C15 = self::E10 {index:#C2, _name:#C3} - #C16 = [#C15] + #C1 = 0 + #C2 = "element" + #C3 = self::E1 {index:#C1, _name:#C2} + #C4 = [#C3] + #C5 = self::E2 {index:#C1, _name:#C2} + #C6 = [#C5] + #C7 = self::E3 {index:#C1, _name:#C2} + #C8 = [#C7] + #C9 = self::E4 {index:#C1, _name:#C2} + #C10 = [#C9] + #C11 = self::E5 {index:#C1, _name:#C2} + #C12 = [#C11] + #C13 = self::E6 {index:#C1, _name:#C2} + #C14 = [#C13] + #C15 = self::E7 {index:#C1, _name:#C2} + #C16 = [#C15] + #C17 = self::E8 {index:#C1, _name:#C2} + #C18 = [#C17] + #C19 = self::E10 {index:#C1, _name:#C2} + #C20 = [#C19] } Constructor coverage from constants: org-dartlang-testcase:///conflicting_elements.dart: -- E2. (from org-dartlang-testcase:///conflicting_elements.dart:11:6) +- E1. (from org-dartlang-testcase:///conflicting_elements.dart:5:6) - _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart) - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) +- E2. (from org-dartlang-testcase:///conflicting_elements.dart:11:6) +- E3. (from org-dartlang-testcase:///conflicting_elements.dart:16:6) +- E4. (from org-dartlang-testcase:///conflicting_elements.dart:22:6) +- E5. (from org-dartlang-testcase:///conflicting_elements.dart:28:6) - E6. (from org-dartlang-testcase:///conflicting_elements.dart:34:6) - E7. (from org-dartlang-testcase:///conflicting_elements.dart:40:6) - E8. (from org-dartlang-testcase:///conflicting_elements.dart:50:6) diff --git a/pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart.strong.outline.expect index 339c439d9330..924d948e252c 100644 --- a/pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart.strong.outline.expect @@ -37,6 +37,13 @@ library; // element; // ^^^^^^^ // +// pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart:37:12: Error: Instance property 'element' conflicts with static property of the same name. +// void set element(E6 value) {} +// ^^^^^^^ +// pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart:35:3: Context: Conflicting static property 'element'. +// element; // Error. +// ^^^^^^^ +// // pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart:35:3: Error: This static member conflicts with an instance member. // element; // Error. // ^^^^^^^ @@ -73,8 +80,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - final field core::int element; - static const field core::List values = const []; + enum-element static const field self::E1 element = const self::E1::•(0, "element"); + static const field core::List values = const [self::E1::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -82,8 +89,8 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E2::element]; enum-element static const field self::E2 element = const self::E2::•(0, "element"); + static const field core::List values = const [self::E2::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -91,28 +98,26 @@ class E2 extends core::_Enum /*isEnum*/ { return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List values = const []; + enum-element static const field self::E3 element = const self::E3::•(0, "element"); + static const field core::List values = const [self::E3::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; method _enumToString() → core::String return "E3.${this.{core::_Enum::_name}{core::String}}"; - method element() → void - ; } class E4 extends core::_Enum /*isEnum*/ { - static const field core::List values = const []; + enum-element static const field self::E4 element = const self::E4::•(0, "element"); + static const field core::List values = const [self::E4::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super core::_Enum::•(#index, #name) ; method _enumToString() → core::String return "E4.${this.{core::_Enum::_name}{core::String}}"; - static method element() → void - ; } class E5 extends core::_Enum /*isEnum*/ { - static field core::int element; - static const field core::List values = const []; + enum-element static const field self::E5 element = const self::E5::•(0, "element"); + static const field core::List values = const [self::E5::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super core::_Enum::•(#index, #name) ; @@ -120,8 +125,8 @@ class E5 extends core::_Enum /*isEnum*/ { return "E5.${this.{core::_Enum::_name}{core::String}}"; } class E6 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E6::element]; enum-element static const field self::E6 element = const self::E6::•(0, "element"); + static const field core::List values = const [self::E6::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super core::_Enum::•(#index, #name) ; @@ -131,8 +136,8 @@ class E6 extends core::_Enum /*isEnum*/ { ; } class E7 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E7::element]; enum-element static const field self::E7 element = const self::E7::•(0, "element"); + static const field core::List values = const [self::E7::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super core::_Enum::•(#index, #name) ; @@ -153,8 +158,8 @@ abstract class _E8&_Enum&A8 = core::_Enum with self::A8 /*isAnonymousMixin,hasCo return super.{self::A8::element} = value; } class E8 extends self::_E8&_Enum&A8 /*isEnum*/ { - static const field core::List values = const [self::E8::element]; enum-element static const field self::E8 element = const self::E8::•(0, "element"); + static const field core::List values = const [self::E8::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E8 : super self::_E8&_Enum&A8::•(#index, #name) ; @@ -174,8 +179,8 @@ abstract class _E9&_Enum&A9 = core::_Enum with self::A9 /*isAnonymousMixin*/ { return super.{self::A9::element}; } class E9 extends self::_E9&_Enum&A9 /*isEnum*/ { - static const field core::List values = const [self::E9::element]; enum-element static const field self::E9 element = const self::E9::•(0, "element"); + static const field core::List values = const [self::E9::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E9 : super self::_E9&_Enum&A9::•(#index, #name) ; @@ -194,8 +199,8 @@ abstract class _E10&_Enum&A10 = core::_Enum with self::A10 /*isAnonymousMixin,ha return super.{self::A10::element}(); } class E10 extends self::_E10&_Enum&A10 /*isEnum*/ { - static const field core::List values = const [self::E10::element]; enum-element static const field self::E10 element = const self::E10::•(0, "element"); + static const field core::List values = const [self::E10::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E10 : super self::_E10&_Enum&A10::•(#index, #name) ; @@ -207,18 +212,22 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///conflicting_elements.dart:5:6 -> ListConstant(const []) -Evaluated: ListLiteral @ org-dartlang-testcase:///conflicting_elements.dart:11:6 -> ListConstant(const [const E2{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///conflicting_elements.dart:6:3 -> InstanceConstant(const E1{_Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///conflicting_elements.dart:5:6 -> ListConstant(const [const E1{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///conflicting_elements.dart:12:3 -> InstanceConstant(const E2{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///conflicting_elements.dart:16:6 -> ListConstant(const []) -Evaluated: ListLiteral @ org-dartlang-testcase:///conflicting_elements.dart:22:6 -> ListConstant(const []) -Evaluated: ListLiteral @ org-dartlang-testcase:///conflicting_elements.dart:28:6 -> ListConstant(const []) -Evaluated: ListLiteral @ org-dartlang-testcase:///conflicting_elements.dart:34:6 -> ListConstant(const [const E6{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///conflicting_elements.dart:11:6 -> ListConstant(const [const E2{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///conflicting_elements.dart:17:3 -> InstanceConstant(const E3{_Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///conflicting_elements.dart:16:6 -> ListConstant(const [const E3{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///conflicting_elements.dart:23:3 -> InstanceConstant(const E4{_Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///conflicting_elements.dart:22:6 -> ListConstant(const [const E4{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ConstructorInvocation @ org-dartlang-testcase:///conflicting_elements.dart:29:3 -> InstanceConstant(const E5{_Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///conflicting_elements.dart:28:6 -> ListConstant(const [const E5{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///conflicting_elements.dart:35:3 -> InstanceConstant(const E6{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///conflicting_elements.dart:40:6 -> ListConstant(const [const E7{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///conflicting_elements.dart:34:6 -> ListConstant(const [const E6{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///conflicting_elements.dart:41:3 -> InstanceConstant(const E7{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///conflicting_elements.dart:50:6 -> ListConstant(const [const E8{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///conflicting_elements.dart:40:6 -> ListConstant(const [const E7{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///conflicting_elements.dart:51:3 -> InstanceConstant(const E8{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///conflicting_elements.dart:66:6 -> ListConstant(const [const E10{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///conflicting_elements.dart:50:6 -> ListConstant(const [const E8{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///conflicting_elements.dart:67:3 -> InstanceConstant(const E10{_Enum.index: 0, _Enum._name: "element"}) -Extra constant evaluation: evaluated: 79, effectively constant: 14 +Evaluated: ListLiteral @ org-dartlang-testcase:///conflicting_elements.dart:66:6 -> ListConstant(const [const E10{_Enum.index: 0, _Enum._name: "element"}]) +Extra constant evaluation: evaluated: 83, effectively constant: 18 diff --git a/pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart.strong.transformed.expect index 020dbacbd5a4..10154d68aa90 100644 --- a/pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart.strong.transformed.expect @@ -37,6 +37,13 @@ library; // element; // ^^^^^^^ // +// pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart:37:12: Error: Instance property 'element' conflicts with static property of the same name. +// void set element(E6 value) {} +// ^^^^^^^ +// pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart:35:3: Context: Conflicting static property 'element'. +// element; // Error. +// ^^^^^^^ +// // pkg/front_end/testcases/enhanced_enums/conflicting_elements.dart:35:3: Error: This static member conflicts with an instance member. // element; // Error. // ^^^^^^^ @@ -73,8 +80,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - final field core::int element = 42; - static const field core::List values = #C1; + enum-element static const field self::E1 element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -82,8 +89,8 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C5; - enum-element static const field self::E2 element = #C4; + enum-element static const field self::E2 element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -91,26 +98,26 @@ class E2 extends core::_Enum /*isEnum*/ { return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C6; + enum-element static const field self::E3 element = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; method _enumToString() → core::String return "E3.${this.{core::_Enum::_name}{core::String}}"; - method element() → void {} } class E4 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; + enum-element static const field self::E4 element = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super core::_Enum::•(#index, #name) ; method _enumToString() → core::String return "E4.${this.{core::_Enum::_name}{core::String}}"; - static method element() → void {} } class E5 extends core::_Enum /*isEnum*/ { - static field core::int element = 42; - static const field core::List values = #C8; + enum-element static const field self::E5 element = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super core::_Enum::•(#index, #name) ; @@ -118,8 +125,8 @@ class E5 extends core::_Enum /*isEnum*/ { return "E5.${this.{core::_Enum::_name}{core::String}}"; } class E6 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; - enum-element static const field self::E6 element = #C9; + enum-element static const field self::E6 element = #C13; + static const field core::List values = #C14; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super core::_Enum::•(#index, #name) ; @@ -128,8 +135,8 @@ class E6 extends core::_Enum /*isEnum*/ { set element(self::E6 value) → void {} } class E7 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C12; - enum-element static const field self::E7 element = #C11; + enum-element static const field self::E7 element = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super core::_Enum::•(#index, #name) ; @@ -147,8 +154,8 @@ abstract class _E8&_Enum&A8 extends core::_Enum implements self::A8 /*isAnonymou set element(dynamic value) → void {} } class E8 extends self::_E8&_Enum&A8 /*isEnum*/ { - static const field core::List values = #C14; - enum-element static const field self::E8 element = #C13; + enum-element static const field self::E8 element = #C17; + static const field core::List values = #C18; const synthetic constructor •(core::int #index, core::String #name) → self::E8 : super self::_E8&_Enum&A8::•(#index, #name) ; @@ -165,8 +172,8 @@ abstract class _E9&_Enum&A9 extends core::_Enum implements self::A9 /*isAnonymou ; } class E9 extends self::_E9&_Enum&A9 /*isEnum*/ { - static const field core::List values = invalid-expression "A constant constructor can't call a non-constant super constructor."; enum-element static const field self::E9 element = invalid-expression "A constant constructor can't call a non-constant super constructor."; + static const field core::List values = invalid-expression "A constant constructor can't call a non-constant super constructor."; const synthetic constructor •(core::int #index, core::String #name) → self::E9 : super self::_E9&_Enum&A9::•(#index, #name) ; @@ -183,8 +190,8 @@ abstract class _E10&_Enum&A10 extends core::_Enum implements self::A10 /*isAnony method element() → void {} } class E10 extends self::_E10&_Enum&A10 /*isEnum*/ { - static const field core::List values = #C16; - enum-element static const field self::E10 element = #C15; + enum-element static const field self::E10 element = #C19; + static const field core::List values = #C20; const synthetic constructor •(core::int #index, core::String #name) → self::E10 : super self::_E10&_Enum&A10::•(#index, #name) ; @@ -194,30 +201,38 @@ class E10 extends self::_E10&_Enum&A10 /*isEnum*/ { static method main() → dynamic {} constants { - #C1 = [] - #C2 = 0 - #C3 = "element" - #C4 = self::E2 {index:#C2, _name:#C3} - #C5 = [#C4] - #C6 = [] - #C7 = [] - #C8 = [] - #C9 = self::E6 {index:#C2, _name:#C3} - #C10 = [#C9] - #C11 = self::E7 {index:#C2, _name:#C3} - #C12 = [#C11] - #C13 = self::E8 {index:#C2, _name:#C3} - #C14 = [#C13] - #C15 = self::E10 {index:#C2, _name:#C3} - #C16 = [#C15] + #C1 = 0 + #C2 = "element" + #C3 = self::E1 {index:#C1, _name:#C2} + #C4 = [#C3] + #C5 = self::E2 {index:#C1, _name:#C2} + #C6 = [#C5] + #C7 = self::E3 {index:#C1, _name:#C2} + #C8 = [#C7] + #C9 = self::E4 {index:#C1, _name:#C2} + #C10 = [#C9] + #C11 = self::E5 {index:#C1, _name:#C2} + #C12 = [#C11] + #C13 = self::E6 {index:#C1, _name:#C2} + #C14 = [#C13] + #C15 = self::E7 {index:#C1, _name:#C2} + #C16 = [#C15] + #C17 = self::E8 {index:#C1, _name:#C2} + #C18 = [#C17] + #C19 = self::E10 {index:#C1, _name:#C2} + #C20 = [#C19] } Constructor coverage from constants: org-dartlang-testcase:///conflicting_elements.dart: -- E2. (from org-dartlang-testcase:///conflicting_elements.dart:11:6) +- E1. (from org-dartlang-testcase:///conflicting_elements.dart:5:6) - _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart) - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) +- E2. (from org-dartlang-testcase:///conflicting_elements.dart:11:6) +- E3. (from org-dartlang-testcase:///conflicting_elements.dart:16:6) +- E4. (from org-dartlang-testcase:///conflicting_elements.dart:22:6) +- E5. (from org-dartlang-testcase:///conflicting_elements.dart:28:6) - E6. (from org-dartlang-testcase:///conflicting_elements.dart:34:6) - E7. (from org-dartlang-testcase:///conflicting_elements.dart:40:6) - E8. (from org-dartlang-testcase:///conflicting_elements.dart:50:6) diff --git a/pkg/front_end/testcases/enhanced_enums/constructor_calls.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/constructor_calls.dart.strong.expect index 12bffdbcf16c..05221d76446b 100644 --- a/pkg/front_end/testcases/enhanced_enums/constructor_calls.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/constructor_calls.dart.strong.expect @@ -60,9 +60,6 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_calls.dart:8:9: Error: Couldn't find constructor 'E.f'. - three.f(), // Error. - ^"; enum-element static const field self::E one = #C3; enum-element static const field self::E two = #C6; enum-element static const field self::E three = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_calls.dart:8:9: Error: Couldn't find constructor 'E.f'. @@ -71,6 +68,9 @@ class E extends core::_Enum /*isEnum*/ { enum-element static const field self::E four = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_calls.dart:9:8: Error: Couldn't find constructor 'E.f2'. four.f2(); // Error. ^^"; + static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_calls.dart:8:9: Error: Couldn't find constructor 'E.f'. + three.f(), // Error. + ^"; const constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/constructor_calls.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/constructor_calls.dart.strong.modular.expect index 12bffdbcf16c..05221d76446b 100644 --- a/pkg/front_end/testcases/enhanced_enums/constructor_calls.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/constructor_calls.dart.strong.modular.expect @@ -60,9 +60,6 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_calls.dart:8:9: Error: Couldn't find constructor 'E.f'. - three.f(), // Error. - ^"; enum-element static const field self::E one = #C3; enum-element static const field self::E two = #C6; enum-element static const field self::E three = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_calls.dart:8:9: Error: Couldn't find constructor 'E.f'. @@ -71,6 +68,9 @@ class E extends core::_Enum /*isEnum*/ { enum-element static const field self::E four = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_calls.dart:9:8: Error: Couldn't find constructor 'E.f2'. four.f2(); // Error. ^^"; + static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_calls.dart:8:9: Error: Couldn't find constructor 'E.f'. + three.f(), // Error. + ^"; const constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/constructor_calls.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/constructor_calls.dart.strong.outline.expect index 6b5d09aa138b..e4d19c12da3b 100644 --- a/pkg/front_end/testcases/enhanced_enums/constructor_calls.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/constructor_calls.dart.strong.outline.expect @@ -27,7 +27,6 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E::one, self::E::two, self::E::three, self::E::four]; enum-element static const field self::E one = const self::E::•(0, "one"); enum-element static const field self::E two = const self::E::named(1, "two"); enum-element static const field self::E three = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_calls.dart:8:9: Error: Couldn't find constructor 'E.f'. @@ -36,6 +35,7 @@ class E extends core::_Enum /*isEnum*/ { enum-element static const field self::E four = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_calls.dart:9:8: Error: Couldn't find constructor 'E.f2'. four.f2(); // Error. ^^"; + static const field core::List values = const [self::E::one, self::E::two, self::E::three, self::E::four]; const constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; @@ -71,8 +71,8 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: StaticGet @ org-dartlang-testcase:///constructor_calls.dart:5:6 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "one"}) -Evaluated: StaticGet @ org-dartlang-testcase:///constructor_calls.dart:5:6 -> InstanceConstant(const E{_Enum.index: 1, _Enum._name: "two"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///constructor_calls.dart:6:3 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "one"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///constructor_calls.dart:7:3 -> InstanceConstant(const E{_Enum.index: 1, _Enum._name: "two"}) +Evaluated: StaticGet @ org-dartlang-testcase:///constructor_calls.dart:5:6 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "one"}) +Evaluated: StaticGet @ org-dartlang-testcase:///constructor_calls.dart:5:6 -> InstanceConstant(const E{_Enum.index: 1, _Enum._name: "two"}) Extra constant evaluation: evaluated: 15, effectively constant: 4 diff --git a/pkg/front_end/testcases/enhanced_enums/constructor_calls.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/constructor_calls.dart.strong.transformed.expect index 12bffdbcf16c..05221d76446b 100644 --- a/pkg/front_end/testcases/enhanced_enums/constructor_calls.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/constructor_calls.dart.strong.transformed.expect @@ -60,9 +60,6 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_calls.dart:8:9: Error: Couldn't find constructor 'E.f'. - three.f(), // Error. - ^"; enum-element static const field self::E one = #C3; enum-element static const field self::E two = #C6; enum-element static const field self::E three = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_calls.dart:8:9: Error: Couldn't find constructor 'E.f'. @@ -71,6 +68,9 @@ class E extends core::_Enum /*isEnum*/ { enum-element static const field self::E four = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_calls.dart:9:8: Error: Couldn't find constructor 'E.f2'. four.f2(); // Error. ^^"; + static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_calls.dart:8:9: Error: Couldn't find constructor 'E.f'. + three.f(), // Error. + ^"; const constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart.strong.expect index 802eeec8e3b1..313f731e67b2 100644 --- a/pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart.strong.expect @@ -14,10 +14,10 @@ import self as self; import "dart:core" as core; class T extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart:6:3: Error: Couldn't find constructor 'T'. + enum-element static const field self::T t = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart:6:3: Error: Couldn't find constructor 'T'. t; ^"; - enum-element static const field self::T t = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart:6:3: Error: Couldn't find constructor 'T'. + static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart:6:3: Error: Couldn't find constructor 'T'. t; ^"; const constructor named(core::int #index, core::String #name) → self::T @@ -27,10 +27,10 @@ class T extends core::_Enum /*isEnum*/ { return "T.${this.{core::_Enum::_name}{core::String}}"; } class S extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart:12:5: Error: Couldn't find constructor 'S.named'. + enum-element static const field self::S s = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart:12:5: Error: Couldn't find constructor 'S.named'. s.named(); ^^^^^"; - enum-element static const field self::S s = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart:12:5: Error: Couldn't find constructor 'S.named'. + static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart:12:5: Error: Couldn't find constructor 'S.named'. s.named(); ^^^^^"; const constructor •(core::int #index, core::String #name) → self::S diff --git a/pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart.strong.modular.expect index 802eeec8e3b1..313f731e67b2 100644 --- a/pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart.strong.modular.expect @@ -14,10 +14,10 @@ import self as self; import "dart:core" as core; class T extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart:6:3: Error: Couldn't find constructor 'T'. + enum-element static const field self::T t = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart:6:3: Error: Couldn't find constructor 'T'. t; ^"; - enum-element static const field self::T t = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart:6:3: Error: Couldn't find constructor 'T'. + static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart:6:3: Error: Couldn't find constructor 'T'. t; ^"; const constructor named(core::int #index, core::String #name) → self::T @@ -27,10 +27,10 @@ class T extends core::_Enum /*isEnum*/ { return "T.${this.{core::_Enum::_name}{core::String}}"; } class S extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart:12:5: Error: Couldn't find constructor 'S.named'. + enum-element static const field self::S s = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart:12:5: Error: Couldn't find constructor 'S.named'. s.named(); ^^^^^"; - enum-element static const field self::S s = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart:12:5: Error: Couldn't find constructor 'S.named'. + static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart:12:5: Error: Couldn't find constructor 'S.named'. s.named(); ^^^^^"; const constructor •(core::int #index, core::String #name) → self::S diff --git a/pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart.strong.outline.expect index 8bd3989b15a8..0f65278c61db 100644 --- a/pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart.strong.outline.expect @@ -14,10 +14,10 @@ import self as self; import "dart:core" as core; class T extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::T::t]; enum-element static const field self::T t = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart:6:3: Error: Couldn't find constructor 'T'. t; ^"; + static const field core::List values = const [self::T::t]; const constructor named(core::int #index, core::String #name) → self::T : super core::_Enum::•(#index, #name) ; @@ -25,10 +25,10 @@ class T extends core::_Enum /*isEnum*/ { return "T.${this.{core::_Enum::_name}{core::String}}"; } class S extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::S::s]; enum-element static const field self::S s = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart:12:5: Error: Couldn't find constructor 'S.named'. s.named(); ^^^^^"; + static const field core::List values = const [self::S::s]; const constructor •(core::int #index, core::String #name) → self::S : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart.strong.transformed.expect index 802eeec8e3b1..313f731e67b2 100644 --- a/pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart.strong.transformed.expect @@ -14,10 +14,10 @@ import self as self; import "dart:core" as core; class T extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart:6:3: Error: Couldn't find constructor 'T'. + enum-element static const field self::T t = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart:6:3: Error: Couldn't find constructor 'T'. t; ^"; - enum-element static const field self::T t = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart:6:3: Error: Couldn't find constructor 'T'. + static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart:6:3: Error: Couldn't find constructor 'T'. t; ^"; const constructor named(core::int #index, core::String #name) → self::T @@ -27,10 +27,10 @@ class T extends core::_Enum /*isEnum*/ { return "T.${this.{core::_Enum::_name}{core::String}}"; } class S extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart:12:5: Error: Couldn't find constructor 'S.named'. + enum-element static const field self::S s = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart:12:5: Error: Couldn't find constructor 'S.named'. s.named(); ^^^^^"; - enum-element static const field self::S s = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart:12:5: Error: Couldn't find constructor 'S.named'. + static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/constructor_not_found.dart:12:5: Error: Couldn't find constructor 'S.named'. s.named(); ^^^^^"; const constructor •(core::int #index, core::String #name) → self::S diff --git a/pkg/front_end/testcases/enhanced_enums/cyclic.dart b/pkg/front_end/testcases/enhanced_enums/cyclic.dart new file mode 100644 index 000000000000..a4df75f8d338 --- /dev/null +++ b/pkg/front_end/testcases/enhanced_enums/cyclic.dart @@ -0,0 +1,11 @@ +// Copyright (c) 2025, 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. + +enum CyclicReference { + e1(e2), + e2(e1); + + final CyclicReference other; + const CyclicReference(this.other); +} diff --git a/pkg/front_end/testcases/enhanced_enums/cyclic.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/cyclic.dart.strong.expect new file mode 100644 index 000000000000..0e506732d264 --- /dev/null +++ b/pkg/front_end/testcases/enhanced_enums/cyclic.dart.strong.expect @@ -0,0 +1,33 @@ +library; +// +// Problems in library: +// +// pkg/front_end/testcases/enhanced_enums/cyclic.dart:6:3: Error: Can't infer the type of 'e1': circularity found during type inference. +// Specify the type explicitly. +// e1(e2), +// ^^ +// +// pkg/front_end/testcases/enhanced_enums/cyclic.dart:6:3: Error: Constant evaluation error: +// e1(e2), +// ^ +// pkg/front_end/testcases/enhanced_enums/cyclic.dart:6:3: Context: Constant expression depends on itself. +// e1(e2), +// ^ +// pkg/front_end/testcases/enhanced_enums/cyclic.dart:6:3: Context: While analyzing: +// e1(e2), +// ^ +// +import self as self; +import "dart:core" as core; + +class CyclicReference extends core::_Enum /*isEnum*/ { + enum-element static const field self::CyclicReference e1 = invalid-expression "Constant expression depends on itself."; + enum-element static const field self::CyclicReference e2 = invalid-expression "Constant expression depends on itself."; + final field self::CyclicReference other; + static const field core::List values = invalid-expression "Constant expression depends on itself."; + const constructor •(core::int #index, core::String #name, self::CyclicReference other) → self::CyclicReference + : self::CyclicReference::other = other, super core::_Enum::•(#index, #name) + ; + method _enumToString() → core::String + return "CyclicReference.${this.{core::_Enum::_name}{core::String}}"; +} diff --git a/pkg/front_end/testcases/enhanced_enums/cyclic.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/cyclic.dart.strong.modular.expect new file mode 100644 index 000000000000..0e506732d264 --- /dev/null +++ b/pkg/front_end/testcases/enhanced_enums/cyclic.dart.strong.modular.expect @@ -0,0 +1,33 @@ +library; +// +// Problems in library: +// +// pkg/front_end/testcases/enhanced_enums/cyclic.dart:6:3: Error: Can't infer the type of 'e1': circularity found during type inference. +// Specify the type explicitly. +// e1(e2), +// ^^ +// +// pkg/front_end/testcases/enhanced_enums/cyclic.dart:6:3: Error: Constant evaluation error: +// e1(e2), +// ^ +// pkg/front_end/testcases/enhanced_enums/cyclic.dart:6:3: Context: Constant expression depends on itself. +// e1(e2), +// ^ +// pkg/front_end/testcases/enhanced_enums/cyclic.dart:6:3: Context: While analyzing: +// e1(e2), +// ^ +// +import self as self; +import "dart:core" as core; + +class CyclicReference extends core::_Enum /*isEnum*/ { + enum-element static const field self::CyclicReference e1 = invalid-expression "Constant expression depends on itself."; + enum-element static const field self::CyclicReference e2 = invalid-expression "Constant expression depends on itself."; + final field self::CyclicReference other; + static const field core::List values = invalid-expression "Constant expression depends on itself."; + const constructor •(core::int #index, core::String #name, self::CyclicReference other) → self::CyclicReference + : self::CyclicReference::other = other, super core::_Enum::•(#index, #name) + ; + method _enumToString() → core::String + return "CyclicReference.${this.{core::_Enum::_name}{core::String}}"; +} diff --git a/pkg/front_end/testcases/enhanced_enums/cyclic.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/cyclic.dart.strong.outline.expect new file mode 100644 index 000000000000..c0352e8bf50a --- /dev/null +++ b/pkg/front_end/testcases/enhanced_enums/cyclic.dart.strong.outline.expect @@ -0,0 +1,23 @@ +library; +// +// Problems in library: +// +// pkg/front_end/testcases/enhanced_enums/cyclic.dart:6:3: Error: Can't infer the type of 'e1': circularity found during type inference. +// Specify the type explicitly. +// e1(e2), +// ^^ +// +import self as self; +import "dart:core" as core; + +class CyclicReference extends core::_Enum /*isEnum*/ { + enum-element static const field self::CyclicReference e1 = const self::CyclicReference::•(0, "e1", self::CyclicReference::e2); + enum-element static const field self::CyclicReference e2 = const self::CyclicReference::•(1, "e2", self::CyclicReference::e1); + final field self::CyclicReference other; + static const field core::List values = const [self::CyclicReference::e1, self::CyclicReference::e2]; + const constructor •(core::int #index, core::String #name, self::CyclicReference other) → self::CyclicReference + : self::CyclicReference::other = other, super core::_Enum::•(#index, #name) + ; + method _enumToString() → core::String + return "CyclicReference.${this.{core::_Enum::_name}{core::String}}"; +} diff --git a/pkg/front_end/testcases/enhanced_enums/cyclic.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/cyclic.dart.strong.transformed.expect new file mode 100644 index 000000000000..0e506732d264 --- /dev/null +++ b/pkg/front_end/testcases/enhanced_enums/cyclic.dart.strong.transformed.expect @@ -0,0 +1,33 @@ +library; +// +// Problems in library: +// +// pkg/front_end/testcases/enhanced_enums/cyclic.dart:6:3: Error: Can't infer the type of 'e1': circularity found during type inference. +// Specify the type explicitly. +// e1(e2), +// ^^ +// +// pkg/front_end/testcases/enhanced_enums/cyclic.dart:6:3: Error: Constant evaluation error: +// e1(e2), +// ^ +// pkg/front_end/testcases/enhanced_enums/cyclic.dart:6:3: Context: Constant expression depends on itself. +// e1(e2), +// ^ +// pkg/front_end/testcases/enhanced_enums/cyclic.dart:6:3: Context: While analyzing: +// e1(e2), +// ^ +// +import self as self; +import "dart:core" as core; + +class CyclicReference extends core::_Enum /*isEnum*/ { + enum-element static const field self::CyclicReference e1 = invalid-expression "Constant expression depends on itself."; + enum-element static const field self::CyclicReference e2 = invalid-expression "Constant expression depends on itself."; + final field self::CyclicReference other; + static const field core::List values = invalid-expression "Constant expression depends on itself."; + const constructor •(core::int #index, core::String #name, self::CyclicReference other) → self::CyclicReference + : self::CyclicReference::other = other, super core::_Enum::•(#index, #name) + ; + method _enumToString() → core::String + return "CyclicReference.${this.{core::_Enum::_name}{core::String}}"; +} diff --git a/pkg/front_end/testcases/enhanced_enums/cyclic.dart.textual_outline.expect b/pkg/front_end/testcases/enhanced_enums/cyclic.dart.textual_outline.expect new file mode 100644 index 000000000000..ad230c2f1a67 --- /dev/null +++ b/pkg/front_end/testcases/enhanced_enums/cyclic.dart.textual_outline.expect @@ -0,0 +1,7 @@ +enum CyclicReference { + e1(e2), + e2(e1); + + final CyclicReference other; + const CyclicReference(this.other); +} diff --git a/pkg/front_end/testcases/enhanced_enums/cyclic.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/enhanced_enums/cyclic.dart.textual_outline_modelled.expect new file mode 100644 index 000000000000..ad230c2f1a67 --- /dev/null +++ b/pkg/front_end/testcases/enhanced_enums/cyclic.dart.textual_outline_modelled.expect @@ -0,0 +1,7 @@ +enum CyclicReference { + e1(e2), + e2(e1); + + final CyclicReference other; + const CyclicReference(this.other); +} diff --git a/pkg/front_end/testcases/enhanced_enums/declared_equals.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/declared_equals.dart.strong.expect index 562ead39f80a..206f44c2d7cc 100644 --- a/pkg/front_end/testcases/enhanced_enums/declared_equals.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/declared_equals.dart.strong.expect @@ -10,8 +10,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E1 element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -21,8 +21,8 @@ class E1 extends core::_Enum /*isEnum*/ { return true; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::E2 element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -37,8 +37,8 @@ abstract class I3 extends core::Object { abstract operator ==(core::Object other) → core::bool; } class E3 extends core::_Enum implements self::I3 /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::E3 element = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/declared_equals.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/declared_equals.dart.strong.modular.expect index 562ead39f80a..206f44c2d7cc 100644 --- a/pkg/front_end/testcases/enhanced_enums/declared_equals.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/declared_equals.dart.strong.modular.expect @@ -10,8 +10,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E1 element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -21,8 +21,8 @@ class E1 extends core::_Enum /*isEnum*/ { return true; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::E2 element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -37,8 +37,8 @@ abstract class I3 extends core::Object { abstract operator ==(core::Object other) → core::bool; } class E3 extends core::_Enum implements self::I3 /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::E3 element = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/declared_equals.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/declared_equals.dart.strong.outline.expect index 8a3e8df3e46b..94c1e74f90fa 100644 --- a/pkg/front_end/testcases/enhanced_enums/declared_equals.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/declared_equals.dart.strong.outline.expect @@ -10,8 +10,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E1::element]; enum-element static const field self::E1 element = const self::E1::•(0, "element"); + static const field core::List values = const [self::E1::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -21,8 +21,8 @@ class E1 extends core::_Enum /*isEnum*/ { ; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E2::element]; enum-element static const field self::E2 element = const self::E2::•(0, "element"); + static const field core::List values = const [self::E2::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -36,8 +36,8 @@ abstract class I3 extends core::Object { abstract operator ==(core::Object other) → core::bool; } class E3 extends core::_Enum implements self::I3 /*isEnum*/ { - static const field core::List values = const [self::E3::element]; enum-element static const field self::E3 element = const self::E3::•(0, "element"); + static const field core::List values = const [self::E3::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -49,10 +49,10 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_equals.dart:5:6 -> ListConstant(const [const E1{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_equals.dart:6:3 -> InstanceConstant(const E1{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_equals.dart:11:6 -> ListConstant(const [const E2{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_equals.dart:5:6 -> ListConstant(const [const E1{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_equals.dart:12:3 -> InstanceConstant(const E2{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_equals.dart:21:6 -> ListConstant(const [const E3{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_equals.dart:11:6 -> ListConstant(const [const E2{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_equals.dart:21:25 -> InstanceConstant(const E3{_Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_equals.dart:21:6 -> ListConstant(const [const E3{_Enum.index: 0, _Enum._name: "element"}]) Extra constant evaluation: evaluated: 21, effectively constant: 6 diff --git a/pkg/front_end/testcases/enhanced_enums/declared_equals.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/declared_equals.dart.strong.transformed.expect index 562ead39f80a..206f44c2d7cc 100644 --- a/pkg/front_end/testcases/enhanced_enums/declared_equals.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/declared_equals.dart.strong.transformed.expect @@ -10,8 +10,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E1 element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -21,8 +21,8 @@ class E1 extends core::_Enum /*isEnum*/ { return true; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::E2 element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -37,8 +37,8 @@ abstract class I3 extends core::Object { abstract operator ==(core::Object other) → core::bool; } class E3 extends core::_Enum implements self::I3 /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::E3 element = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/declared_hashcode.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/declared_hashcode.dart.strong.expect index c03f0b5c4cda..ddc61e7d0677 100644 --- a/pkg/front_end/testcases/enhanced_enums/declared_hashcode.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/declared_hashcode.dart.strong.expect @@ -100,8 +100,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E1 element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -111,8 +111,8 @@ class E1 extends core::_Enum /*isEnum*/ { return 42; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::E2 element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -122,9 +122,9 @@ class E2 extends core::_Enum /*isEnum*/ { return "foo"; } class E3 extends core::_Enum /*isEnum*/ { + enum-element static const field self::E3 element = #C8; final field core::int hashCode = 42; static const field core::List values = #C9; - enum-element static const field self::E3 element = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -132,8 +132,8 @@ class E3 extends core::_Enum /*isEnum*/ { return "E3.${this.{core::_Enum::_name}{core::String}}"; } class E4 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C11; enum-element static const field self::E4 element = #C10; + static const field core::List values = #C11; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super core::_Enum::•(#index, #name) ; @@ -143,8 +143,8 @@ class E4 extends core::_Enum /*isEnum*/ { return []; } class E5 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C13; enum-element static const field self::E5 element = #C12; + static const field core::List values = #C13; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super core::_Enum::•(#index, #name) ; @@ -154,11 +154,11 @@ class E5 extends core::_Enum /*isEnum*/ { return throw 42; } class E6 extends core::_Enum /*isEnum*/ { + enum-element static const field self::E6 element = #C16; final field core::int foo = 0; final field core::int hashCode = 1; final field core::int bar = 2; static const field core::List values = #C17; - enum-element static const field self::E6 element = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super core::_Enum::•(#index, #name) ; @@ -166,8 +166,8 @@ class E6 extends core::_Enum /*isEnum*/ { return "E6.${this.{core::_Enum::_name}{core::String}}"; } class E7 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::E7 element = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super core::_Enum::•(#index, #name) ; @@ -177,8 +177,8 @@ class E7 extends core::_Enum /*isEnum*/ { abstract get hashCode() → core::int; } class E8 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C21; enum-element static const field self::E8 element = #C20; + static const field core::List values = #C21; const synthetic constructor •(core::int #index, core::String #name) → self::E8 : super core::_Enum::•(#index, #name) ; @@ -187,8 +187,8 @@ class E8 extends core::_Enum /*isEnum*/ { set hashCode(core::String value) → void {} } class E9 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C23; enum-element static const field self::E9 element = #C22; + static const field core::List values = #C23; const synthetic constructor •(core::int #index, core::String #name) → self::E9 : super core::_Enum::•(#index, #name) ; @@ -197,8 +197,8 @@ class E9 extends core::_Enum /*isEnum*/ { abstract get hashCode() → core::double; } class E10 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C25; enum-element static const field self::E10 element = #C24; + static const field core::List values = #C25; const synthetic constructor •(core::int #index, core::String #name) → self::E10 : super core::_Enum::•(#index, #name) ; @@ -208,8 +208,8 @@ class E10 extends core::_Enum /*isEnum*/ { return 42; } class E11 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C27; enum-element static const field self::E11 element = #C26; + static const field core::List values = #C27; const synthetic constructor •(core::int #index, core::String #name) → self::E11 : super core::_Enum::•(#index, #name) ; @@ -218,8 +218,8 @@ class E11 extends core::_Enum /*isEnum*/ { static set hashCode(core::int value) → void {} } class E12 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C30; enum-element static const field self::E12 hashCode = #C29; + static const field core::List values = #C30; const synthetic constructor •(core::int #index, core::String #name) → self::E12 : super core::_Enum::•(#index, #name) ; @@ -233,8 +233,8 @@ abstract class I13 extends core::Object { abstract get hashCode() → core::int; } class E13 extends core::_Enum implements self::I13 /*isEnum*/ { - static const field core::List values = #C32; enum-element static const field self::E13 element = #C31; + static const field core::List values = #C32; const synthetic constructor •(core::int #index, core::String #name) → self::E13 : super core::_Enum::•(#index, #name) ; @@ -248,8 +248,8 @@ abstract class I14 extends core::Object { abstract get hashCode() → Never; } class E14 extends core::_Enum implements self::I14 /*isEnum*/ { - static const field core::List values = #C34; enum-element static const field self::E14 element = #C33; + static const field core::List values = #C34; const synthetic constructor •(core::int #index, core::String #name) → self::E14 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/declared_hashcode.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/declared_hashcode.dart.strong.modular.expect index c03f0b5c4cda..ddc61e7d0677 100644 --- a/pkg/front_end/testcases/enhanced_enums/declared_hashcode.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/declared_hashcode.dart.strong.modular.expect @@ -100,8 +100,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E1 element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -111,8 +111,8 @@ class E1 extends core::_Enum /*isEnum*/ { return 42; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::E2 element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -122,9 +122,9 @@ class E2 extends core::_Enum /*isEnum*/ { return "foo"; } class E3 extends core::_Enum /*isEnum*/ { + enum-element static const field self::E3 element = #C8; final field core::int hashCode = 42; static const field core::List values = #C9; - enum-element static const field self::E3 element = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -132,8 +132,8 @@ class E3 extends core::_Enum /*isEnum*/ { return "E3.${this.{core::_Enum::_name}{core::String}}"; } class E4 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C11; enum-element static const field self::E4 element = #C10; + static const field core::List values = #C11; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super core::_Enum::•(#index, #name) ; @@ -143,8 +143,8 @@ class E4 extends core::_Enum /*isEnum*/ { return []; } class E5 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C13; enum-element static const field self::E5 element = #C12; + static const field core::List values = #C13; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super core::_Enum::•(#index, #name) ; @@ -154,11 +154,11 @@ class E5 extends core::_Enum /*isEnum*/ { return throw 42; } class E6 extends core::_Enum /*isEnum*/ { + enum-element static const field self::E6 element = #C16; final field core::int foo = 0; final field core::int hashCode = 1; final field core::int bar = 2; static const field core::List values = #C17; - enum-element static const field self::E6 element = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super core::_Enum::•(#index, #name) ; @@ -166,8 +166,8 @@ class E6 extends core::_Enum /*isEnum*/ { return "E6.${this.{core::_Enum::_name}{core::String}}"; } class E7 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::E7 element = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super core::_Enum::•(#index, #name) ; @@ -177,8 +177,8 @@ class E7 extends core::_Enum /*isEnum*/ { abstract get hashCode() → core::int; } class E8 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C21; enum-element static const field self::E8 element = #C20; + static const field core::List values = #C21; const synthetic constructor •(core::int #index, core::String #name) → self::E8 : super core::_Enum::•(#index, #name) ; @@ -187,8 +187,8 @@ class E8 extends core::_Enum /*isEnum*/ { set hashCode(core::String value) → void {} } class E9 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C23; enum-element static const field self::E9 element = #C22; + static const field core::List values = #C23; const synthetic constructor •(core::int #index, core::String #name) → self::E9 : super core::_Enum::•(#index, #name) ; @@ -197,8 +197,8 @@ class E9 extends core::_Enum /*isEnum*/ { abstract get hashCode() → core::double; } class E10 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C25; enum-element static const field self::E10 element = #C24; + static const field core::List values = #C25; const synthetic constructor •(core::int #index, core::String #name) → self::E10 : super core::_Enum::•(#index, #name) ; @@ -208,8 +208,8 @@ class E10 extends core::_Enum /*isEnum*/ { return 42; } class E11 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C27; enum-element static const field self::E11 element = #C26; + static const field core::List values = #C27; const synthetic constructor •(core::int #index, core::String #name) → self::E11 : super core::_Enum::•(#index, #name) ; @@ -218,8 +218,8 @@ class E11 extends core::_Enum /*isEnum*/ { static set hashCode(core::int value) → void {} } class E12 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C30; enum-element static const field self::E12 hashCode = #C29; + static const field core::List values = #C30; const synthetic constructor •(core::int #index, core::String #name) → self::E12 : super core::_Enum::•(#index, #name) ; @@ -233,8 +233,8 @@ abstract class I13 extends core::Object { abstract get hashCode() → core::int; } class E13 extends core::_Enum implements self::I13 /*isEnum*/ { - static const field core::List values = #C32; enum-element static const field self::E13 element = #C31; + static const field core::List values = #C32; const synthetic constructor •(core::int #index, core::String #name) → self::E13 : super core::_Enum::•(#index, #name) ; @@ -248,8 +248,8 @@ abstract class I14 extends core::Object { abstract get hashCode() → Never; } class E14 extends core::_Enum implements self::I14 /*isEnum*/ { - static const field core::List values = #C34; enum-element static const field self::E14 element = #C33; + static const field core::List values = #C34; const synthetic constructor •(core::int #index, core::String #name) → self::E14 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/declared_hashcode.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/declared_hashcode.dart.strong.outline.expect index 4afa4cb202bb..0f5fc6b1f6d8 100644 --- a/pkg/front_end/testcases/enhanced_enums/declared_hashcode.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/declared_hashcode.dart.strong.outline.expect @@ -100,8 +100,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E1::element]; enum-element static const field self::E1 element = const self::E1::•(0, "element"); + static const field core::List values = const [self::E1::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -111,8 +111,8 @@ class E1 extends core::_Enum /*isEnum*/ { ; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E2::element]; enum-element static const field self::E2 element = const self::E2::•(0, "element"); + static const field core::List values = const [self::E2::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -122,9 +122,9 @@ class E2 extends core::_Enum /*isEnum*/ { ; } class E3 extends core::_Enum /*isEnum*/ { + enum-element static const field self::E3 element = const self::E3::•(0, "element"); final field core::int hashCode; static const field core::List values = const [self::E3::element]; - enum-element static const field self::E3 element = const self::E3::•(0, "element"); const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -132,8 +132,8 @@ class E3 extends core::_Enum /*isEnum*/ { return "E3.${this.{core::_Enum::_name}{core::String}}"; } class E4 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E4::element]; enum-element static const field self::E4 element = const self::E4::•(0, "element"); + static const field core::List values = const [self::E4::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super core::_Enum::•(#index, #name) ; @@ -143,8 +143,8 @@ class E4 extends core::_Enum /*isEnum*/ { ; } class E5 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E5::element]; enum-element static const field self::E5 element = const self::E5::•(0, "element"); + static const field core::List values = const [self::E5::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super core::_Enum::•(#index, #name) ; @@ -154,11 +154,11 @@ class E5 extends core::_Enum /*isEnum*/ { ; } class E6 extends core::_Enum /*isEnum*/ { + enum-element static const field self::E6 element = const self::E6::•(0, "element"); final field core::int foo; final field core::int hashCode; final field core::int bar; static const field core::List values = const [self::E6::element]; - enum-element static const field self::E6 element = const self::E6::•(0, "element"); const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super core::_Enum::•(#index, #name) ; @@ -166,8 +166,8 @@ class E6 extends core::_Enum /*isEnum*/ { return "E6.${this.{core::_Enum::_name}{core::String}}"; } class E7 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E7::element]; enum-element static const field self::E7 element = const self::E7::•(0, "element"); + static const field core::List values = const [self::E7::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super core::_Enum::•(#index, #name) ; @@ -178,8 +178,8 @@ class E7 extends core::_Enum /*isEnum*/ { abstract get hashCode() → core::int; } class E8 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E8::element]; enum-element static const field self::E8 element = const self::E8::•(0, "element"); + static const field core::List values = const [self::E8::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E8 : super core::_Enum::•(#index, #name) ; @@ -189,8 +189,8 @@ class E8 extends core::_Enum /*isEnum*/ { ; } class E9 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E9::element]; enum-element static const field self::E9 element = const self::E9::•(0, "element"); + static const field core::List values = const [self::E9::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E9 : super core::_Enum::•(#index, #name) ; @@ -199,8 +199,8 @@ class E9 extends core::_Enum /*isEnum*/ { abstract get hashCode() → core::double; } class E10 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E10::element]; enum-element static const field self::E10 element = const self::E10::•(0, "element"); + static const field core::List values = const [self::E10::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E10 : super core::_Enum::•(#index, #name) ; @@ -210,8 +210,8 @@ class E10 extends core::_Enum /*isEnum*/ { ; } class E11 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E11::element]; enum-element static const field self::E11 element = const self::E11::•(0, "element"); + static const field core::List values = const [self::E11::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E11 : super core::_Enum::•(#index, #name) ; @@ -221,8 +221,8 @@ class E11 extends core::_Enum /*isEnum*/ { ; } class E12 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E12::hashCode]; enum-element static const field self::E12 hashCode = const self::E12::•(0, "hashCode"); + static const field core::List values = const [self::E12::hashCode]; const synthetic constructor •(core::int #index, core::String #name) → self::E12 : super core::_Enum::•(#index, #name) ; @@ -235,8 +235,8 @@ abstract class I13 extends core::Object { abstract get hashCode() → core::int; } class E13 extends core::_Enum implements self::I13 /*isEnum*/ { - static const field core::List values = const [self::E13::element]; enum-element static const field self::E13 element = const self::E13::•(0, "element"); + static const field core::List values = const [self::E13::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E13 : super core::_Enum::•(#index, #name) ; @@ -249,8 +249,8 @@ abstract class I14 extends core::Object { abstract get hashCode() → Never; } class E14 extends core::_Enum implements self::I14 /*isEnum*/ { - static const field core::List values = const [self::E14::element]; enum-element static const field self::E14 element = const self::E14::•(0, "element"); + static const field core::List values = const [self::E14::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E14 : super core::_Enum::•(#index, #name) ; @@ -263,32 +263,32 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:5:6 -> ListConstant(const [const E1{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_hashcode.dart:6:3 -> InstanceConstant(const E1{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:11:6 -> ListConstant(const [const E2{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:5:6 -> ListConstant(const [const E1{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_hashcode.dart:12:3 -> InstanceConstant(const E2{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:17:6 -> ListConstant(const [const E3{E3.hashCode: null, _Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:11:6 -> ListConstant(const [const E2{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_hashcode.dart:18:3 -> InstanceConstant(const E3{E3.hashCode: null, _Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:23:6 -> ListConstant(const [const E4{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:17:6 -> ListConstant(const [const E3{E3.hashCode: null, _Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_hashcode.dart:24:3 -> InstanceConstant(const E4{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:29:6 -> ListConstant(const [const E5{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:23:6 -> ListConstant(const [const E4{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_hashcode.dart:30:3 -> InstanceConstant(const E5{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:35:6 -> ListConstant(const [const E6{E6.foo: null, E6.hashCode: null, E6.bar: null, _Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:29:6 -> ListConstant(const [const E5{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_hashcode.dart:36:3 -> InstanceConstant(const E6{E6.foo: null, E6.hashCode: null, E6.bar: null, _Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:41:6 -> ListConstant(const [const E7{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:35:6 -> ListConstant(const [const E6{E6.foo: null, E6.hashCode: null, E6.bar: null, _Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_hashcode.dart:42:3 -> InstanceConstant(const E7{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:49:6 -> ListConstant(const [const E8{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:41:6 -> ListConstant(const [const E7{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_hashcode.dart:50:3 -> InstanceConstant(const E8{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:55:6 -> ListConstant(const [const E9{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:49:6 -> ListConstant(const [const E8{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_hashcode.dart:56:3 -> InstanceConstant(const E9{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:61:6 -> ListConstant(const [const E10{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:55:6 -> ListConstant(const [const E9{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_hashcode.dart:62:3 -> InstanceConstant(const E10{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:67:6 -> ListConstant(const [const E11{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:61:6 -> ListConstant(const [const E10{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_hashcode.dart:68:3 -> InstanceConstant(const E11{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:73:6 -> ListConstant(const [const E12{_Enum.index: 0, _Enum._name: "hashCode"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:67:6 -> ListConstant(const [const E11{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_hashcode.dart:74:3 -> InstanceConstant(const E12{_Enum.index: 0, _Enum._name: "hashCode"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:81:6 -> ListConstant(const [const E13{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:73:6 -> ListConstant(const [const E12{_Enum.index: 0, _Enum._name: "hashCode"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_hashcode.dart:81:27 -> InstanceConstant(const E13{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:87:6 -> ListConstant(const [const E14{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:81:6 -> ListConstant(const [const E13{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_hashcode.dart:87:27 -> InstanceConstant(const E14{_Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:87:6 -> ListConstant(const [const E14{_Enum.index: 0, _Enum._name: "element"}]) Extra constant evaluation: evaluated: 98, effectively constant: 28 diff --git a/pkg/front_end/testcases/enhanced_enums/declared_index.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/declared_index.dart.strong.expect index d14dace0b25d..25aa1298216b 100644 --- a/pkg/front_end/testcases/enhanced_enums/declared_index.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/declared_index.dart.strong.expect @@ -100,8 +100,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E1 element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -111,8 +111,8 @@ class E1 extends core::_Enum /*isEnum*/ { return 42; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::E2 element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -122,9 +122,9 @@ class E2 extends core::_Enum /*isEnum*/ { return "foo"; } class E3 extends core::_Enum /*isEnum*/ { + enum-element static const field self::E3 element = #C8; final field core::int index = 42; static const field core::List values = #C9; - enum-element static const field self::E3 element = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -132,8 +132,8 @@ class E3 extends core::_Enum /*isEnum*/ { return "E3.${this.{core::_Enum::_name}{core::String}}"; } class E4 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C11; enum-element static const field self::E4 element = #C10; + static const field core::List values = #C11; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super core::_Enum::•(#index, #name) ; @@ -143,8 +143,8 @@ class E4 extends core::_Enum /*isEnum*/ { return []; } class E5 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C13; enum-element static const field self::E5 element = #C12; + static const field core::List values = #C13; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super core::_Enum::•(#index, #name) ; @@ -154,11 +154,11 @@ class E5 extends core::_Enum /*isEnum*/ { return throw 42; } class E6 extends core::_Enum /*isEnum*/ { + enum-element static const field self::E6 element = #C16; final field core::int foo = 0; final field core::int index = 1; final field core::int bar = 2; static const field core::List values = #C17; - enum-element static const field self::E6 element = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super core::_Enum::•(#index, #name) ; @@ -166,8 +166,8 @@ class E6 extends core::_Enum /*isEnum*/ { return "E6.${this.{core::_Enum::_name}{core::String}}"; } class E7 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::E7 element = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super core::_Enum::•(#index, #name) ; @@ -177,8 +177,8 @@ class E7 extends core::_Enum /*isEnum*/ { abstract get index() → core::int; } class E8 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C21; enum-element static const field self::E8 element = #C20; + static const field core::List values = #C21; const synthetic constructor •(core::int #index, core::String #name) → self::E8 : super core::_Enum::•(#index, #name) ; @@ -187,8 +187,8 @@ class E8 extends core::_Enum /*isEnum*/ { set index(core::String value) → void {} } class E9 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C23; enum-element static const field self::E9 element = #C22; + static const field core::List values = #C23; const synthetic constructor •(core::int #index, core::String #name) → self::E9 : super core::_Enum::•(#index, #name) ; @@ -197,8 +197,8 @@ class E9 extends core::_Enum /*isEnum*/ { abstract get index() → core::double; } class E10 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C25; enum-element static const field self::E10 element = #C24; + static const field core::List values = #C25; const synthetic constructor •(core::int #index, core::String #name) → self::E10 : super core::_Enum::•(#index, #name) ; @@ -208,8 +208,8 @@ class E10 extends core::_Enum /*isEnum*/ { return 42; } class E11 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C27; enum-element static const field self::E11 element = #C26; + static const field core::List values = #C27; const synthetic constructor •(core::int #index, core::String #name) → self::E11 : super core::_Enum::•(#index, #name) ; @@ -218,8 +218,8 @@ class E11 extends core::_Enum /*isEnum*/ { static set index(core::int value) → void {} } class E12 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C30; enum-element static const field self::E12 index = #C29; + static const field core::List values = #C30; const synthetic constructor •(core::int #index, core::String #name) → self::E12 : super core::_Enum::•(#index, #name) ; @@ -233,8 +233,8 @@ abstract class I13 extends core::Object { abstract get index() → core::int; } class E13 extends core::_Enum implements self::I13 /*isEnum*/ { - static const field core::List values = #C32; enum-element static const field self::E13 element = #C31; + static const field core::List values = #C32; const synthetic constructor •(core::int #index, core::String #name) → self::E13 : super core::_Enum::•(#index, #name) ; @@ -248,8 +248,8 @@ abstract class I14 extends core::Object { abstract get index() → Never; } class E14 extends core::_Enum implements self::I14 /*isEnum*/ { - static const field core::List values = #C34; enum-element static const field self::E14 element = #C33; + static const field core::List values = #C34; const synthetic constructor •(core::int #index, core::String #name) → self::E14 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/declared_index.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/declared_index.dart.strong.modular.expect index d14dace0b25d..25aa1298216b 100644 --- a/pkg/front_end/testcases/enhanced_enums/declared_index.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/declared_index.dart.strong.modular.expect @@ -100,8 +100,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E1 element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -111,8 +111,8 @@ class E1 extends core::_Enum /*isEnum*/ { return 42; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::E2 element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -122,9 +122,9 @@ class E2 extends core::_Enum /*isEnum*/ { return "foo"; } class E3 extends core::_Enum /*isEnum*/ { + enum-element static const field self::E3 element = #C8; final field core::int index = 42; static const field core::List values = #C9; - enum-element static const field self::E3 element = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -132,8 +132,8 @@ class E3 extends core::_Enum /*isEnum*/ { return "E3.${this.{core::_Enum::_name}{core::String}}"; } class E4 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C11; enum-element static const field self::E4 element = #C10; + static const field core::List values = #C11; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super core::_Enum::•(#index, #name) ; @@ -143,8 +143,8 @@ class E4 extends core::_Enum /*isEnum*/ { return []; } class E5 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C13; enum-element static const field self::E5 element = #C12; + static const field core::List values = #C13; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super core::_Enum::•(#index, #name) ; @@ -154,11 +154,11 @@ class E5 extends core::_Enum /*isEnum*/ { return throw 42; } class E6 extends core::_Enum /*isEnum*/ { + enum-element static const field self::E6 element = #C16; final field core::int foo = 0; final field core::int index = 1; final field core::int bar = 2; static const field core::List values = #C17; - enum-element static const field self::E6 element = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super core::_Enum::•(#index, #name) ; @@ -166,8 +166,8 @@ class E6 extends core::_Enum /*isEnum*/ { return "E6.${this.{core::_Enum::_name}{core::String}}"; } class E7 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::E7 element = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super core::_Enum::•(#index, #name) ; @@ -177,8 +177,8 @@ class E7 extends core::_Enum /*isEnum*/ { abstract get index() → core::int; } class E8 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C21; enum-element static const field self::E8 element = #C20; + static const field core::List values = #C21; const synthetic constructor •(core::int #index, core::String #name) → self::E8 : super core::_Enum::•(#index, #name) ; @@ -187,8 +187,8 @@ class E8 extends core::_Enum /*isEnum*/ { set index(core::String value) → void {} } class E9 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C23; enum-element static const field self::E9 element = #C22; + static const field core::List values = #C23; const synthetic constructor •(core::int #index, core::String #name) → self::E9 : super core::_Enum::•(#index, #name) ; @@ -197,8 +197,8 @@ class E9 extends core::_Enum /*isEnum*/ { abstract get index() → core::double; } class E10 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C25; enum-element static const field self::E10 element = #C24; + static const field core::List values = #C25; const synthetic constructor •(core::int #index, core::String #name) → self::E10 : super core::_Enum::•(#index, #name) ; @@ -208,8 +208,8 @@ class E10 extends core::_Enum /*isEnum*/ { return 42; } class E11 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C27; enum-element static const field self::E11 element = #C26; + static const field core::List values = #C27; const synthetic constructor •(core::int #index, core::String #name) → self::E11 : super core::_Enum::•(#index, #name) ; @@ -218,8 +218,8 @@ class E11 extends core::_Enum /*isEnum*/ { static set index(core::int value) → void {} } class E12 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C30; enum-element static const field self::E12 index = #C29; + static const field core::List values = #C30; const synthetic constructor •(core::int #index, core::String #name) → self::E12 : super core::_Enum::•(#index, #name) ; @@ -233,8 +233,8 @@ abstract class I13 extends core::Object { abstract get index() → core::int; } class E13 extends core::_Enum implements self::I13 /*isEnum*/ { - static const field core::List values = #C32; enum-element static const field self::E13 element = #C31; + static const field core::List values = #C32; const synthetic constructor •(core::int #index, core::String #name) → self::E13 : super core::_Enum::•(#index, #name) ; @@ -248,8 +248,8 @@ abstract class I14 extends core::Object { abstract get index() → Never; } class E14 extends core::_Enum implements self::I14 /*isEnum*/ { - static const field core::List values = #C34; enum-element static const field self::E14 element = #C33; + static const field core::List values = #C34; const synthetic constructor •(core::int #index, core::String #name) → self::E14 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/declared_index.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/declared_index.dart.strong.outline.expect index b2465ce961c3..ef628c0ea238 100644 --- a/pkg/front_end/testcases/enhanced_enums/declared_index.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/declared_index.dart.strong.outline.expect @@ -100,8 +100,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E1::element]; enum-element static const field self::E1 element = const self::E1::•(0, "element"); + static const field core::List values = const [self::E1::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -111,8 +111,8 @@ class E1 extends core::_Enum /*isEnum*/ { ; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E2::element]; enum-element static const field self::E2 element = const self::E2::•(0, "element"); + static const field core::List values = const [self::E2::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -122,9 +122,9 @@ class E2 extends core::_Enum /*isEnum*/ { ; } class E3 extends core::_Enum /*isEnum*/ { + enum-element static const field self::E3 element = const self::E3::•(0, "element"); final field core::int index; static const field core::List values = const [self::E3::element]; - enum-element static const field self::E3 element = const self::E3::•(0, "element"); const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -132,8 +132,8 @@ class E3 extends core::_Enum /*isEnum*/ { return "E3.${this.{core::_Enum::_name}{core::String}}"; } class E4 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E4::element]; enum-element static const field self::E4 element = const self::E4::•(0, "element"); + static const field core::List values = const [self::E4::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super core::_Enum::•(#index, #name) ; @@ -143,8 +143,8 @@ class E4 extends core::_Enum /*isEnum*/ { ; } class E5 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E5::element]; enum-element static const field self::E5 element = const self::E5::•(0, "element"); + static const field core::List values = const [self::E5::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super core::_Enum::•(#index, #name) ; @@ -154,11 +154,11 @@ class E5 extends core::_Enum /*isEnum*/ { ; } class E6 extends core::_Enum /*isEnum*/ { + enum-element static const field self::E6 element = const self::E6::•(0, "element"); final field core::int foo; final field core::int index; final field core::int bar; static const field core::List values = const [self::E6::element]; - enum-element static const field self::E6 element = const self::E6::•(0, "element"); const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super core::_Enum::•(#index, #name) ; @@ -166,8 +166,8 @@ class E6 extends core::_Enum /*isEnum*/ { return "E6.${this.{core::_Enum::_name}{core::String}}"; } class E7 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E7::element]; enum-element static const field self::E7 element = const self::E7::•(0, "element"); + static const field core::List values = const [self::E7::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super core::_Enum::•(#index, #name) ; @@ -178,8 +178,8 @@ class E7 extends core::_Enum /*isEnum*/ { abstract get index() → core::int; } class E8 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E8::element]; enum-element static const field self::E8 element = const self::E8::•(0, "element"); + static const field core::List values = const [self::E8::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E8 : super core::_Enum::•(#index, #name) ; @@ -189,8 +189,8 @@ class E8 extends core::_Enum /*isEnum*/ { ; } class E9 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E9::element]; enum-element static const field self::E9 element = const self::E9::•(0, "element"); + static const field core::List values = const [self::E9::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E9 : super core::_Enum::•(#index, #name) ; @@ -199,8 +199,8 @@ class E9 extends core::_Enum /*isEnum*/ { abstract get index() → core::double; } class E10 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E10::element]; enum-element static const field self::E10 element = const self::E10::•(0, "element"); + static const field core::List values = const [self::E10::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E10 : super core::_Enum::•(#index, #name) ; @@ -210,8 +210,8 @@ class E10 extends core::_Enum /*isEnum*/ { ; } class E11 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E11::element]; enum-element static const field self::E11 element = const self::E11::•(0, "element"); + static const field core::List values = const [self::E11::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E11 : super core::_Enum::•(#index, #name) ; @@ -221,8 +221,8 @@ class E11 extends core::_Enum /*isEnum*/ { ; } class E12 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E12::index]; enum-element static const field self::E12 index = const self::E12::•(0, "index"); + static const field core::List values = const [self::E12::index]; const synthetic constructor •(core::int #index, core::String #name) → self::E12 : super core::_Enum::•(#index, #name) ; @@ -235,8 +235,8 @@ abstract class I13 extends core::Object { abstract get index() → core::int; } class E13 extends core::_Enum implements self::I13 /*isEnum*/ { - static const field core::List values = const [self::E13::element]; enum-element static const field self::E13 element = const self::E13::•(0, "element"); + static const field core::List values = const [self::E13::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E13 : super core::_Enum::•(#index, #name) ; @@ -249,8 +249,8 @@ abstract class I14 extends core::Object { abstract get index() → Never; } class E14 extends core::_Enum implements self::I14 /*isEnum*/ { - static const field core::List values = const [self::E14::element]; enum-element static const field self::E14 element = const self::E14::•(0, "element"); + static const field core::List values = const [self::E14::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E14 : super core::_Enum::•(#index, #name) ; @@ -263,32 +263,32 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:5:6 -> ListConstant(const [const E1{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_index.dart:6:3 -> InstanceConstant(const E1{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:11:6 -> ListConstant(const [const E2{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:5:6 -> ListConstant(const [const E1{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_index.dart:12:3 -> InstanceConstant(const E2{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:17:6 -> ListConstant(const [const E3{E3.index: null, _Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:11:6 -> ListConstant(const [const E2{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_index.dart:18:3 -> InstanceConstant(const E3{E3.index: null, _Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:23:6 -> ListConstant(const [const E4{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:17:6 -> ListConstant(const [const E3{E3.index: null, _Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_index.dart:24:3 -> InstanceConstant(const E4{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:29:6 -> ListConstant(const [const E5{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:23:6 -> ListConstant(const [const E4{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_index.dart:30:3 -> InstanceConstant(const E5{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:35:6 -> ListConstant(const [const E6{E6.foo: null, E6.index: null, E6.bar: null, _Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:29:6 -> ListConstant(const [const E5{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_index.dart:36:3 -> InstanceConstant(const E6{E6.foo: null, E6.index: null, E6.bar: null, _Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:41:6 -> ListConstant(const [const E7{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:35:6 -> ListConstant(const [const E6{E6.foo: null, E6.index: null, E6.bar: null, _Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_index.dart:42:3 -> InstanceConstant(const E7{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:49:6 -> ListConstant(const [const E8{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:41:6 -> ListConstant(const [const E7{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_index.dart:50:3 -> InstanceConstant(const E8{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:55:6 -> ListConstant(const [const E9{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:49:6 -> ListConstant(const [const E8{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_index.dart:56:3 -> InstanceConstant(const E9{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:61:6 -> ListConstant(const [const E10{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:55:6 -> ListConstant(const [const E9{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_index.dart:62:3 -> InstanceConstant(const E10{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:67:6 -> ListConstant(const [const E11{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:61:6 -> ListConstant(const [const E10{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_index.dart:68:3 -> InstanceConstant(const E11{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:73:6 -> ListConstant(const [const E12{_Enum.index: 0, _Enum._name: "index"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:67:6 -> ListConstant(const [const E11{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_index.dart:74:3 -> InstanceConstant(const E12{_Enum.index: 0, _Enum._name: "index"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:81:6 -> ListConstant(const [const E13{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:73:6 -> ListConstant(const [const E12{_Enum.index: 0, _Enum._name: "index"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_index.dart:81:27 -> InstanceConstant(const E13{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:87:6 -> ListConstant(const [const E14{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:81:6 -> ListConstant(const [const E13{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_index.dart:87:27 -> InstanceConstant(const E14{_Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:87:6 -> ListConstant(const [const E14{_Enum.index: 0, _Enum._name: "element"}]) Extra constant evaluation: evaluated: 98, effectively constant: 28 diff --git a/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.expect index 41b5e3e3d8ed..acde6f62e550 100644 --- a/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.expect @@ -29,8 +29,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E1 element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -38,8 +38,8 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::E2 element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -47,8 +47,8 @@ class E2 extends core::_Enum /*isEnum*/ { return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::E3 element = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -56,8 +56,8 @@ class E3 extends core::_Enum /*isEnum*/ { return "E3.${this.{core::_Enum::_name}{core::String}}"; } class E4 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E4 element = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super core::_Enum::•(#index, #name) ; @@ -66,8 +66,8 @@ class E4 extends core::_Enum /*isEnum*/ { static set values(core::List x) → void {} } class E5 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C12; enum-element static const field self::E5 element = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super core::_Enum::•(#index, #name) ; @@ -76,8 +76,8 @@ class E5 extends core::_Enum /*isEnum*/ { static set values(dynamic x) → void {} } class E6 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C14; enum-element static const field self::E6 element = #C13; + static const field core::List values = #C14; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super core::_Enum::•(#index, #name) ; @@ -86,8 +86,8 @@ class E6 extends core::_Enum /*isEnum*/ { static set values(Never x) → void {} } class E7 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field self::E7 element = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.modular.expect index 41b5e3e3d8ed..acde6f62e550 100644 --- a/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.modular.expect @@ -29,8 +29,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E1 element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -38,8 +38,8 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::E2 element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -47,8 +47,8 @@ class E2 extends core::_Enum /*isEnum*/ { return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::E3 element = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -56,8 +56,8 @@ class E3 extends core::_Enum /*isEnum*/ { return "E3.${this.{core::_Enum::_name}{core::String}}"; } class E4 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E4 element = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super core::_Enum::•(#index, #name) ; @@ -66,8 +66,8 @@ class E4 extends core::_Enum /*isEnum*/ { static set values(core::List x) → void {} } class E5 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C12; enum-element static const field self::E5 element = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super core::_Enum::•(#index, #name) ; @@ -76,8 +76,8 @@ class E5 extends core::_Enum /*isEnum*/ { static set values(dynamic x) → void {} } class E6 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C14; enum-element static const field self::E6 element = #C13; + static const field core::List values = #C14; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super core::_Enum::•(#index, #name) ; @@ -86,8 +86,8 @@ class E6 extends core::_Enum /*isEnum*/ { static set values(Never x) → void {} } class E7 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field self::E7 element = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.outline.expect index 371f613ea0b3..75a74ef4f6fa 100644 --- a/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.outline.expect @@ -29,8 +29,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E1::element]; enum-element static const field self::E1 element = const self::E1::•(0, "element"); + static const field core::List values = const [self::E1::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -38,8 +38,8 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E2::element]; enum-element static const field self::E2 element = const self::E2::•(0, "element"); + static const field core::List values = const [self::E2::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -47,8 +47,8 @@ class E2 extends core::_Enum /*isEnum*/ { return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E3::element]; enum-element static const field self::E3 element = const self::E3::•(0, "element"); + static const field core::List values = const [self::E3::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -56,8 +56,8 @@ class E3 extends core::_Enum /*isEnum*/ { return "E3.${this.{core::_Enum::_name}{core::String}}"; } class E4 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E4::element]; enum-element static const field self::E4 element = const self::E4::•(0, "element"); + static const field core::List values = const [self::E4::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super core::_Enum::•(#index, #name) ; @@ -67,8 +67,8 @@ class E4 extends core::_Enum /*isEnum*/ { ; } class E5 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E5::element]; enum-element static const field self::E5 element = const self::E5::•(0, "element"); + static const field core::List values = const [self::E5::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super core::_Enum::•(#index, #name) ; @@ -78,8 +78,8 @@ class E5 extends core::_Enum /*isEnum*/ { ; } class E6 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E6::element]; enum-element static const field self::E6 element = const self::E6::•(0, "element"); + static const field core::List values = const [self::E6::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super core::_Enum::•(#index, #name) ; @@ -89,8 +89,8 @@ class E6 extends core::_Enum /*isEnum*/ { ; } class E7 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E7::element]; enum-element static const field self::E7 element = const self::E7::•(0, "element"); + static const field core::List values = const [self::E7::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super core::_Enum::•(#index, #name) ; @@ -102,18 +102,18 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_values.dart:5:6 -> ListConstant(const [const E1{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_values.dart:6:3 -> InstanceConstant(const E1{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_values.dart:11:6 -> ListConstant(const [const E2{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_values.dart:5:6 -> ListConstant(const [const E1{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_values.dart:12:3 -> InstanceConstant(const E2{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_values.dart:17:6 -> ListConstant(const [const E3{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_values.dart:11:6 -> ListConstant(const [const E2{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_values.dart:18:3 -> InstanceConstant(const E3{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_values.dart:24:6 -> ListConstant(const [const E4{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_values.dart:17:6 -> ListConstant(const [const E3{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_values.dart:25:3 -> InstanceConstant(const E4{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_values.dart:30:6 -> ListConstant(const [const E5{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_values.dart:24:6 -> ListConstant(const [const E4{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_values.dart:31:3 -> InstanceConstant(const E5{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_values.dart:36:6 -> ListConstant(const [const E6{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_values.dart:30:6 -> ListConstant(const [const E5{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_values.dart:37:3 -> InstanceConstant(const E6{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_values.dart:42:6 -> ListConstant(const [const E7{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_values.dart:36:6 -> ListConstant(const [const E6{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_values.dart:43:3 -> InstanceConstant(const E7{_Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_values.dart:42:6 -> ListConstant(const [const E7{_Enum.index: 0, _Enum._name: "element"}]) Extra constant evaluation: evaluated: 49, effectively constant: 14 diff --git a/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.transformed.expect index 41b5e3e3d8ed..acde6f62e550 100644 --- a/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.transformed.expect @@ -29,8 +29,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E1 element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -38,8 +38,8 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::E2 element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -47,8 +47,8 @@ class E2 extends core::_Enum /*isEnum*/ { return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::E3 element = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -56,8 +56,8 @@ class E3 extends core::_Enum /*isEnum*/ { return "E3.${this.{core::_Enum::_name}{core::String}}"; } class E4 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E4 element = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super core::_Enum::•(#index, #name) ; @@ -66,8 +66,8 @@ class E4 extends core::_Enum /*isEnum*/ { static set values(core::List x) → void {} } class E5 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C12; enum-element static const field self::E5 element = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super core::_Enum::•(#index, #name) ; @@ -76,8 +76,8 @@ class E5 extends core::_Enum /*isEnum*/ { static set values(dynamic x) → void {} } class E6 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C14; enum-element static const field self::E6 element = #C13; + static const field core::List values = #C14; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super core::_Enum::•(#index, #name) ; @@ -86,8 +86,8 @@ class E6 extends core::_Enum /*isEnum*/ { static set values(Never x) → void {} } class E7 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field self::E7 element = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/entries_with_type_arguments.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/entries_with_type_arguments.dart.strong.expect index be5b16e28122..2bbf8ab2ba10 100644 --- a/pkg/front_end/testcases/enhanced_enums/entries_with_type_arguments.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/entries_with_type_arguments.dart.strong.expect @@ -10,11 +10,11 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C13; enum-element static const field self::E one = #C3; enum-element static const field self::E two = #C6; enum-element static const field self::E three = #C9; enum-element static const field self::E four = #C12; + static const field core::List> values = #C13; const constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/entries_with_type_arguments.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/entries_with_type_arguments.dart.strong.modular.expect index be5b16e28122..2bbf8ab2ba10 100644 --- a/pkg/front_end/testcases/enhanced_enums/entries_with_type_arguments.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/entries_with_type_arguments.dart.strong.modular.expect @@ -10,11 +10,11 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C13; enum-element static const field self::E one = #C3; enum-element static const field self::E two = #C6; enum-element static const field self::E three = #C9; enum-element static const field self::E four = #C12; + static const field core::List> values = #C13; const constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/entries_with_type_arguments.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/entries_with_type_arguments.dart.strong.outline.expect index 6b1c8be7d03b..8e70232f34a6 100644 --- a/pkg/front_end/testcases/enhanced_enums/entries_with_type_arguments.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/entries_with_type_arguments.dart.strong.outline.expect @@ -10,11 +10,11 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List> values = const >[self::E::one, self::E::two, self::E::three, self::E::four]; enum-element static const field self::E one = const self::E::•(0, "one"); enum-element static const field self::E two = const self::E::•(1, "two"); enum-element static const field self::E three = const self::E::named(2, "three", 42); enum-element static const field self::E four = const self::E::•(3, "four"); + static const field core::List> values = const >[self::E::one, self::E::two, self::E::three, self::E::four]; const constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; @@ -29,9 +29,9 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///entries_with_type_arguments.dart:5:6 -> ListConstant(const >[const E{_Enum.index: 0, _Enum._name: "one"}, const E{_Enum.index: 1, _Enum._name: "two"}, const E{_Enum.index: 2, _Enum._name: "three"}, const E{_Enum.index: 3, _Enum._name: "four"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///entries_with_type_arguments.dart:6:3 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "one"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///entries_with_type_arguments.dart:7:3 -> InstanceConstant(const E{_Enum.index: 1, _Enum._name: "two"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///entries_with_type_arguments.dart:8:3 -> InstanceConstant(const E{_Enum.index: 2, _Enum._name: "three"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///entries_with_type_arguments.dart:9:3 -> InstanceConstant(const E{_Enum.index: 3, _Enum._name: "four"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///entries_with_type_arguments.dart:5:6 -> ListConstant(const >[const E{_Enum.index: 0, _Enum._name: "one"}, const E{_Enum.index: 1, _Enum._name: "two"}, const E{_Enum.index: 2, _Enum._name: "three"}, const E{_Enum.index: 3, _Enum._name: "four"}]) Extra constant evaluation: evaluated: 12, effectively constant: 5 diff --git a/pkg/front_end/testcases/enhanced_enums/entries_with_type_arguments.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/entries_with_type_arguments.dart.strong.transformed.expect index be5b16e28122..2bbf8ab2ba10 100644 --- a/pkg/front_end/testcases/enhanced_enums/entries_with_type_arguments.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/entries_with_type_arguments.dart.strong.transformed.expect @@ -10,11 +10,11 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C13; enum-element static const field self::E one = #C3; enum-element static const field self::E two = #C6; enum-element static const field self::E three = #C9; enum-element static const field self::E four = #C12; + static const field core::List> values = #C13; const constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/enum_as_supertype.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/enum_as_supertype.dart.strong.expect index b70e5454ab4c..e2d5f9de6b6e 100644 --- a/pkg/front_end/testcases/enhanced_enums/enum_as_supertype.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/enum_as_supertype.dart.strong.expect @@ -32,8 +32,8 @@ abstract class _EA&_Enum&A = core::_Enum with self::A /*isAnonymousMixin,hasCons return super.{self::A::foo}; } class EA extends self::_EA&_Enum&A /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::EA element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::EA : super self::_EA&_Enum&A::•(#index, #name) ; @@ -55,8 +55,8 @@ abstract class _EB&_Enum&B = core::_Enum with self::B /*isAnonymousMixin,hasCons return super.{self::B::foo}; } class EB extends self::_EB&_Enum&B /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::EB element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::EB : super self::_EB&_Enum&B::•(#index, #name) ; @@ -75,8 +75,8 @@ abstract class _EM&_Enum&M = core::_Enum with self::M /*isAnonymousMixin,hasCons return super.{self::M::foo}; } class EM extends self::_EM&_Enum&M /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::EM element = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::EM : super self::_EM&_Enum&M::•(#index, #name) ; @@ -95,8 +95,8 @@ abstract class _EN&_Enum&N = core::_Enum with self::N /*isAnonymousMixin,hasCons return super.{self::N::foo}; } class EN extends self::_EN&_Enum&N /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::EN element = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::EN : super self::_EN&_Enum&N::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/enum_as_supertype.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/enum_as_supertype.dart.strong.modular.expect index b70e5454ab4c..e2d5f9de6b6e 100644 --- a/pkg/front_end/testcases/enhanced_enums/enum_as_supertype.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/enum_as_supertype.dart.strong.modular.expect @@ -32,8 +32,8 @@ abstract class _EA&_Enum&A = core::_Enum with self::A /*isAnonymousMixin,hasCons return super.{self::A::foo}; } class EA extends self::_EA&_Enum&A /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::EA element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::EA : super self::_EA&_Enum&A::•(#index, #name) ; @@ -55,8 +55,8 @@ abstract class _EB&_Enum&B = core::_Enum with self::B /*isAnonymousMixin,hasCons return super.{self::B::foo}; } class EB extends self::_EB&_Enum&B /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::EB element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::EB : super self::_EB&_Enum&B::•(#index, #name) ; @@ -75,8 +75,8 @@ abstract class _EM&_Enum&M = core::_Enum with self::M /*isAnonymousMixin,hasCons return super.{self::M::foo}; } class EM extends self::_EM&_Enum&M /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::EM element = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::EM : super self::_EM&_Enum&M::•(#index, #name) ; @@ -95,8 +95,8 @@ abstract class _EN&_Enum&N = core::_Enum with self::N /*isAnonymousMixin,hasCons return super.{self::N::foo}; } class EN extends self::_EN&_Enum&N /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::EN element = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::EN : super self::_EN&_Enum&N::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/enum_as_supertype.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/enum_as_supertype.dart.strong.outline.expect index 82f1e29b1513..3e90a7649281 100644 --- a/pkg/front_end/testcases/enhanced_enums/enum_as_supertype.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/enum_as_supertype.dart.strong.outline.expect @@ -31,8 +31,8 @@ abstract class _EA&_Enum&A = core::_Enum with self::A /*isAnonymousMixin,hasCons return super.{self::A::foo}; } class EA extends self::_EA&_Enum&A /*isEnum*/ { - static const field core::List values = const [self::EA::element]; enum-element static const field self::EA element = const self::EA::•(0, "element"); + static const field core::List values = const [self::EA::element]; const synthetic constructor •(core::int #index, core::String #name) → self::EA : super self::_EA&_Enum&A::•(#index, #name) ; @@ -53,8 +53,8 @@ abstract class _EB&_Enum&B = core::_Enum with self::B /*isAnonymousMixin,hasCons return super.{self::B::foo}; } class EB extends self::_EB&_Enum&B /*isEnum*/ { - static const field core::List values = const [self::EB::element]; enum-element static const field self::EB element = const self::EB::•(0, "element"); + static const field core::List values = const [self::EB::element]; const synthetic constructor •(core::int #index, core::String #name) → self::EB : super self::_EB&_Enum&B::•(#index, #name) ; @@ -73,8 +73,8 @@ abstract class _EM&_Enum&M = core::_Enum with self::M /*isAnonymousMixin,hasCons return super.{self::M::foo}; } class EM extends self::_EM&_Enum&M /*isEnum*/ { - static const field core::List values = const [self::EM::element]; enum-element static const field self::EM element = const self::EM::•(0, "element"); + static const field core::List values = const [self::EM::element]; const synthetic constructor •(core::int #index, core::String #name) → self::EM : super self::_EM&_Enum&M::•(#index, #name) ; @@ -93,8 +93,8 @@ abstract class _EN&_Enum&N = core::_Enum with self::N /*isAnonymousMixin,hasCons return super.{self::N::foo}; } class EN extends self::_EN&_Enum&N /*isEnum*/ { - static const field core::List values = const [self::EN::element]; enum-element static const field self::EN element = const self::EN::•(0, "element"); + static const field core::List values = const [self::EN::element]; const synthetic constructor •(core::int #index, core::String #name) → self::EN : super self::_EN&_Enum&N::•(#index, #name) ; @@ -108,12 +108,12 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///enum_as_supertype.dart:10:6 -> ListConstant(const [const EA{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum_as_supertype.dart:10:18 -> InstanceConstant(const EA{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///enum_as_supertype.dart:17:6 -> ListConstant(const [const EB{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///enum_as_supertype.dart:10:6 -> ListConstant(const [const EA{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum_as_supertype.dart:17:18 -> InstanceConstant(const EB{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///enum_as_supertype.dart:24:6 -> ListConstant(const [const EM{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///enum_as_supertype.dart:17:6 -> ListConstant(const [const EB{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum_as_supertype.dart:24:18 -> InstanceConstant(const EM{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///enum_as_supertype.dart:31:6 -> ListConstant(const [const EN{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///enum_as_supertype.dart:24:6 -> ListConstant(const [const EM{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum_as_supertype.dart:31:18 -> InstanceConstant(const EN{_Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///enum_as_supertype.dart:31:6 -> ListConstant(const [const EN{_Enum.index: 0, _Enum._name: "element"}]) Extra constant evaluation: evaluated: 40, effectively constant: 8 diff --git a/pkg/front_end/testcases/enhanced_enums/enum_as_supertype.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/enum_as_supertype.dart.strong.transformed.expect index bc198b8fd25b..a8cc7ffa3993 100644 --- a/pkg/front_end/testcases/enhanced_enums/enum_as_supertype.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/enum_as_supertype.dart.strong.transformed.expect @@ -32,8 +32,8 @@ abstract class _EA&_Enum&A extends core::_Enum implements self::A /*isAnonymousM return this.{core::Enum::index}{core::int}; } class EA extends self::_EA&_Enum&A /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::EA element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::EA : super self::_EA&_Enum&A::•(#index, #name) ; @@ -55,8 +55,8 @@ abstract class _EB&_Enum&B extends core::_Enum implements self::B /*isAnonymousM return this.{core::Enum::index}{core::int}; } class EB extends self::_EB&_Enum&B /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::EB element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::EB : super self::_EB&_Enum&B::•(#index, #name) ; @@ -75,8 +75,8 @@ abstract class _EM&_Enum&M extends core::_Enum implements self::M /*isAnonymousM return this.{core::Enum::index}{core::int}; } class EM extends self::_EM&_Enum&M /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::EM element = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::EM : super self::_EM&_Enum&M::•(#index, #name) ; @@ -95,8 +95,8 @@ abstract class _EN&_Enum&N extends core::_Enum implements self::N /*isAnonymousM return this.{core::Enum::index}{core::int}; } class EN extends self::_EN&_Enum&N /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::EN element = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::EN : super self::_EN&_Enum&N::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/enum_with_mixin.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/enum_with_mixin.dart.strong.expect index b9140a0f9464..594fa80d2954 100644 --- a/pkg/front_end/testcases/enhanced_enums/enum_with_mixin.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/enum_with_mixin.dart.strong.expect @@ -12,8 +12,8 @@ abstract class _SomeEnum&_Enum&HasSomeField = core::_Enum with self::HasSomeFiel abstract mixin-stub get someField() → core::String; -> self::HasSomeField::someField } class SomeEnum extends self::_SomeEnum&_Enum&HasSomeField /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::SomeEnum value = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::SomeEnum : super self::_SomeEnum&_Enum&HasSomeField::•(#index, #name) ; @@ -24,8 +24,8 @@ class SomeEnum extends self::_SomeEnum&_Enum&HasSomeField /*isEnum*/ { return "field"; } class NormalEnum extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::NormalEnum value = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::NormalEnum : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/enum_with_mixin.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/enum_with_mixin.dart.strong.modular.expect index b9140a0f9464..594fa80d2954 100644 --- a/pkg/front_end/testcases/enhanced_enums/enum_with_mixin.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/enum_with_mixin.dart.strong.modular.expect @@ -12,8 +12,8 @@ abstract class _SomeEnum&_Enum&HasSomeField = core::_Enum with self::HasSomeFiel abstract mixin-stub get someField() → core::String; -> self::HasSomeField::someField } class SomeEnum extends self::_SomeEnum&_Enum&HasSomeField /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::SomeEnum value = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::SomeEnum : super self::_SomeEnum&_Enum&HasSomeField::•(#index, #name) ; @@ -24,8 +24,8 @@ class SomeEnum extends self::_SomeEnum&_Enum&HasSomeField /*isEnum*/ { return "field"; } class NormalEnum extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::NormalEnum value = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::NormalEnum : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/enum_with_mixin.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/enum_with_mixin.dart.strong.outline.expect index b706f8a5d015..ec5c5405b233 100644 --- a/pkg/front_end/testcases/enhanced_enums/enum_with_mixin.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/enum_with_mixin.dart.strong.outline.expect @@ -12,8 +12,8 @@ abstract class _SomeEnum&_Enum&HasSomeField = core::_Enum with self::HasSomeFiel abstract mixin-stub get someField() → core::String; -> self::HasSomeField::someField } class SomeEnum extends self::_SomeEnum&_Enum&HasSomeField /*isEnum*/ { - static const field core::List values = const [self::SomeEnum::value]; enum-element static const field self::SomeEnum value = const self::SomeEnum::•(0, "value"); + static const field core::List values = const [self::SomeEnum::value]; const synthetic constructor •(core::int #index, core::String #name) → self::SomeEnum : super self::_SomeEnum&_Enum&HasSomeField::•(#index, #name) ; @@ -24,8 +24,8 @@ class SomeEnum extends self::_SomeEnum&_Enum&HasSomeField /*isEnum*/ { ; } class NormalEnum extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::NormalEnum::value]; enum-element static const field self::NormalEnum value = const self::NormalEnum::•(0, "value"); + static const field core::List values = const [self::NormalEnum::value]; const synthetic constructor •(core::int #index, core::String #name) → self::NormalEnum : super core::_Enum::•(#index, #name) ; @@ -36,8 +36,8 @@ class NormalEnum extends core::_Enum /*isEnum*/ { Extra constant evaluation status: Evaluated: StaticGet @ org-dartlang-testcase:///enum_with_mixin.dart:12:4 -> InstanceConstant(const _Override{}) -Evaluated: ListLiteral @ org-dartlang-testcase:///enum_with_mixin.dart:9:6 -> ListConstant(const [const SomeEnum{_Enum.index: 0, _Enum._name: "value"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum_with_mixin.dart:10:3 -> InstanceConstant(const SomeEnum{_Enum.index: 0, _Enum._name: "value"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///enum_with_mixin.dart:16:6 -> ListConstant(const [const NormalEnum{_Enum.index: 0, _Enum._name: "value"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///enum_with_mixin.dart:9:6 -> ListConstant(const [const SomeEnum{_Enum.index: 0, _Enum._name: "value"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum_with_mixin.dart:17:3 -> InstanceConstant(const NormalEnum{_Enum.index: 0, _Enum._name: "value"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///enum_with_mixin.dart:16:6 -> ListConstant(const [const NormalEnum{_Enum.index: 0, _Enum._name: "value"}]) Extra constant evaluation: evaluated: 17, effectively constant: 5 diff --git a/pkg/front_end/testcases/enhanced_enums/enum_with_mixin.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/enum_with_mixin.dart.strong.transformed.expect index 3a9be1076f5b..e64a836fdceb 100644 --- a/pkg/front_end/testcases/enhanced_enums/enum_with_mixin.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/enum_with_mixin.dart.strong.transformed.expect @@ -12,8 +12,8 @@ abstract class _SomeEnum&_Enum&HasSomeField extends core::_Enum implements self: abstract get someField() → core::String; } class SomeEnum extends self::_SomeEnum&_Enum&HasSomeField /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::SomeEnum value = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::SomeEnum : super self::_SomeEnum&_Enum&HasSomeField::•(#index, #name) ; @@ -24,8 +24,8 @@ class SomeEnum extends self::_SomeEnum&_Enum&HasSomeField /*isEnum*/ { return "field"; } class NormalEnum extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::NormalEnum value = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::NormalEnum : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/external_constructor.dart b/pkg/front_end/testcases/enhanced_enums/external_constructor.dart new file mode 100644 index 000000000000..bdb1ddd2b784 --- /dev/null +++ b/pkg/front_end/testcases/enhanced_enums/external_constructor.dart @@ -0,0 +1,10 @@ +// Copyright (c) 2025, 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. + +enum E { + a(1); + + final int x; + external const E(this.x); +} diff --git a/pkg/front_end/testcases/enhanced_enums/external_constructor.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/external_constructor.dart.strong.expect new file mode 100644 index 000000000000..16d7973b13f5 --- /dev/null +++ b/pkg/front_end/testcases/enhanced_enums/external_constructor.dart.strong.expect @@ -0,0 +1,34 @@ +library; +// +// Problems in library: +// +// pkg/front_end/testcases/enhanced_enums/external_constructor.dart:9:25: Error: An external constructor can't initialize fields. +// Try removing the field initializers, or removing the keyword 'external'. +// external const E(this.x); +// ^ +// +// pkg/front_end/testcases/enhanced_enums/external_constructor.dart:6:3: Error: Constant evaluation error: +// a(1); +// ^ +// pkg/front_end/testcases/enhanced_enums/external_constructor.dart:6:3: Context: External constructors can't be evaluated in constant expressions. +// a(1); +// ^ +// pkg/front_end/testcases/enhanced_enums/external_constructor.dart:6:3: Context: While analyzing: +// a(1); +// ^ +// +import self as self; +import "dart:core" as core; + +class E extends core::_Enum /*isEnum*/ { + enum-element static const field self::E a = invalid-expression "External constructors can't be evaluated in constant expressions."; + final field core::int x; + static const field core::List values = invalid-expression "External constructors can't be evaluated in constant expressions."; + external const constructor •(core::int #index, core::String #name, core::int x) → self::E + : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/enhanced_enums/external_constructor.dart:9:25: Error: An external constructor can't initialize fields. +Try removing the field initializers, or removing the keyword 'external'. + external const E(this.x); + ^"; + method _enumToString() → core::String + return "E.${this.{core::_Enum::_name}{core::String}}"; +} diff --git a/pkg/front_end/testcases/enhanced_enums/external_constructor.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/external_constructor.dart.strong.modular.expect new file mode 100644 index 000000000000..16d7973b13f5 --- /dev/null +++ b/pkg/front_end/testcases/enhanced_enums/external_constructor.dart.strong.modular.expect @@ -0,0 +1,34 @@ +library; +// +// Problems in library: +// +// pkg/front_end/testcases/enhanced_enums/external_constructor.dart:9:25: Error: An external constructor can't initialize fields. +// Try removing the field initializers, or removing the keyword 'external'. +// external const E(this.x); +// ^ +// +// pkg/front_end/testcases/enhanced_enums/external_constructor.dart:6:3: Error: Constant evaluation error: +// a(1); +// ^ +// pkg/front_end/testcases/enhanced_enums/external_constructor.dart:6:3: Context: External constructors can't be evaluated in constant expressions. +// a(1); +// ^ +// pkg/front_end/testcases/enhanced_enums/external_constructor.dart:6:3: Context: While analyzing: +// a(1); +// ^ +// +import self as self; +import "dart:core" as core; + +class E extends core::_Enum /*isEnum*/ { + enum-element static const field self::E a = invalid-expression "External constructors can't be evaluated in constant expressions."; + final field core::int x; + static const field core::List values = invalid-expression "External constructors can't be evaluated in constant expressions."; + external const constructor •(core::int #index, core::String #name, core::int x) → self::E + : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/enhanced_enums/external_constructor.dart:9:25: Error: An external constructor can't initialize fields. +Try removing the field initializers, or removing the keyword 'external'. + external const E(this.x); + ^"; + method _enumToString() → core::String + return "E.${this.{core::_Enum::_name}{core::String}}"; +} diff --git a/pkg/front_end/testcases/enhanced_enums/external_constructor.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/external_constructor.dart.strong.outline.expect new file mode 100644 index 000000000000..259103a027b1 --- /dev/null +++ b/pkg/front_end/testcases/enhanced_enums/external_constructor.dart.strong.outline.expect @@ -0,0 +1,24 @@ +library; +// +// Problems in library: +// +// pkg/front_end/testcases/enhanced_enums/external_constructor.dart:9:25: Error: An external constructor can't initialize fields. +// Try removing the field initializers, or removing the keyword 'external'. +// external const E(this.x); +// ^ +// +import self as self; +import "dart:core" as core; + +class E extends core::_Enum /*isEnum*/ { + enum-element static const field self::E a = const self::E::•(0, "a", 1); + final field core::int x; + static const field core::List values = const [self::E::a]; + external const constructor •(core::int #index, core::String #name, core::int x) → self::E + : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/enhanced_enums/external_constructor.dart:9:25: Error: An external constructor can't initialize fields. +Try removing the field initializers, or removing the keyword 'external'. + external const E(this.x); + ^"; + method _enumToString() → core::String + return "E.${this.{core::_Enum::_name}{core::String}}"; +} diff --git a/pkg/front_end/testcases/enhanced_enums/external_constructor.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/external_constructor.dart.strong.transformed.expect new file mode 100644 index 000000000000..16d7973b13f5 --- /dev/null +++ b/pkg/front_end/testcases/enhanced_enums/external_constructor.dart.strong.transformed.expect @@ -0,0 +1,34 @@ +library; +// +// Problems in library: +// +// pkg/front_end/testcases/enhanced_enums/external_constructor.dart:9:25: Error: An external constructor can't initialize fields. +// Try removing the field initializers, or removing the keyword 'external'. +// external const E(this.x); +// ^ +// +// pkg/front_end/testcases/enhanced_enums/external_constructor.dart:6:3: Error: Constant evaluation error: +// a(1); +// ^ +// pkg/front_end/testcases/enhanced_enums/external_constructor.dart:6:3: Context: External constructors can't be evaluated in constant expressions. +// a(1); +// ^ +// pkg/front_end/testcases/enhanced_enums/external_constructor.dart:6:3: Context: While analyzing: +// a(1); +// ^ +// +import self as self; +import "dart:core" as core; + +class E extends core::_Enum /*isEnum*/ { + enum-element static const field self::E a = invalid-expression "External constructors can't be evaluated in constant expressions."; + final field core::int x; + static const field core::List values = invalid-expression "External constructors can't be evaluated in constant expressions."; + external const constructor •(core::int #index, core::String #name, core::int x) → self::E + : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/enhanced_enums/external_constructor.dart:9:25: Error: An external constructor can't initialize fields. +Try removing the field initializers, or removing the keyword 'external'. + external const E(this.x); + ^"; + method _enumToString() → core::String + return "E.${this.{core::_Enum::_name}{core::String}}"; +} diff --git a/pkg/front_end/testcases/enhanced_enums/external_constructor.dart.textual_outline.expect b/pkg/front_end/testcases/enhanced_enums/external_constructor.dart.textual_outline.expect new file mode 100644 index 000000000000..2f862af7ff2c --- /dev/null +++ b/pkg/front_end/testcases/enhanced_enums/external_constructor.dart.textual_outline.expect @@ -0,0 +1 @@ +enum E { a(1); final int x; external const E(this.x); } diff --git a/pkg/front_end/testcases/enhanced_enums/generic_enum_switch.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/generic_enum_switch.dart.strong.expect index 6abbc1566106..264341aa8e3f 100644 --- a/pkg/front_end/testcases/enhanced_enums/generic_enum_switch.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/generic_enum_switch.dart.strong.expect @@ -94,10 +94,10 @@ import self as self; import "dart:core" as core; class Enum extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C10; enum-element static const field self::Enum a = #C3; enum-element static const field self::Enum b = #C6; enum-element static const field self::Enum c = #C9; + static const field core::List> values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::Enum : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/generic_enum_switch.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/generic_enum_switch.dart.strong.modular.expect index 6abbc1566106..264341aa8e3f 100644 --- a/pkg/front_end/testcases/enhanced_enums/generic_enum_switch.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/generic_enum_switch.dart.strong.modular.expect @@ -94,10 +94,10 @@ import self as self; import "dart:core" as core; class Enum extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C10; enum-element static const field self::Enum a = #C3; enum-element static const field self::Enum b = #C6; enum-element static const field self::Enum c = #C9; + static const field core::List> values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::Enum : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/generic_enum_switch.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/generic_enum_switch.dart.strong.outline.expect index 462e4c002cf0..81fe35066a72 100644 --- a/pkg/front_end/testcases/enhanced_enums/generic_enum_switch.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/generic_enum_switch.dart.strong.outline.expect @@ -3,10 +3,10 @@ import self as self; import "dart:core" as core; class Enum extends core::_Enum /*isEnum*/ { - static const field core::List> values = const >[self::Enum::a, self::Enum::b, self::Enum::c]; enum-element static const field self::Enum a = const self::Enum::•(0, "a"); enum-element static const field self::Enum b = const self::Enum::•(1, "b"); enum-element static const field self::Enum c = const self::Enum::•(2, "c"); + static const field core::List> values = const >[self::Enum::a, self::Enum::b, self::Enum::c]; const synthetic constructor •(core::int #index, core::String #name) → self::Enum : super core::_Enum::•(#index, #name) ; @@ -26,8 +26,8 @@ static method method5(self::Enum e) → d Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///generic_enum_switch.dart:7:6 -> ListConstant(const >[const Enum{_Enum.index: 0, _Enum._name: "a"}, const Enum{_Enum.index: 1, _Enum._name: "b"}, const Enum{_Enum.index: 2, _Enum._name: "c"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///generic_enum_switch.dart:8:3 -> InstanceConstant(const Enum{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///generic_enum_switch.dart:9:3 -> InstanceConstant(const Enum{_Enum.index: 1, _Enum._name: "b"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///generic_enum_switch.dart:10:3 -> InstanceConstant(const Enum{_Enum.index: 2, _Enum._name: "c"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///generic_enum_switch.dart:7:6 -> ListConstant(const >[const Enum{_Enum.index: 0, _Enum._name: "a"}, const Enum{_Enum.index: 1, _Enum._name: "b"}, const Enum{_Enum.index: 2, _Enum._name: "c"}]) Extra constant evaluation: evaluated: 9, effectively constant: 4 diff --git a/pkg/front_end/testcases/enhanced_enums/generic_enum_switch.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/generic_enum_switch.dart.strong.transformed.expect index 6abbc1566106..264341aa8e3f 100644 --- a/pkg/front_end/testcases/enhanced_enums/generic_enum_switch.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/generic_enum_switch.dart.strong.transformed.expect @@ -94,10 +94,10 @@ import self as self; import "dart:core" as core; class Enum extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C10; enum-element static const field self::Enum a = #C3; enum-element static const field self::Enum b = #C6; enum-element static const field self::Enum c = #C9; + static const field core::List> values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::Enum : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/inference_in_constructor_parameters.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/inference_in_constructor_parameters.dart.strong.expect index 5204e867d39b..13278c67c6a2 100644 --- a/pkg/front_end/testcases/enhanced_enums/inference_in_constructor_parameters.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/inference_in_constructor_parameters.dart.strong.expect @@ -3,8 +3,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E1 bar = #C3; + static const field core::List values = #C4; const constructor •(core::int #index, core::String #name, (core::int) → core::int f) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -12,8 +12,8 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C6; enum-element static const field self::E2<(X%) → X%> bar = #C5; + static const field core::List> values = #C6; const constructor •(core::int #index, core::String #name, self::E2::X% f) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -21,8 +21,8 @@ class E2 extends core::_Enum /*isEnum*/ { return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C9; enum-element static const field self::E3 element = #C8; + static const field core::List> values = #C9; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/inference_in_constructor_parameters.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/inference_in_constructor_parameters.dart.strong.modular.expect index 5204e867d39b..13278c67c6a2 100644 --- a/pkg/front_end/testcases/enhanced_enums/inference_in_constructor_parameters.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/inference_in_constructor_parameters.dart.strong.modular.expect @@ -3,8 +3,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E1 bar = #C3; + static const field core::List values = #C4; const constructor •(core::int #index, core::String #name, (core::int) → core::int f) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -12,8 +12,8 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C6; enum-element static const field self::E2<(X%) → X%> bar = #C5; + static const field core::List> values = #C6; const constructor •(core::int #index, core::String #name, self::E2::X% f) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -21,8 +21,8 @@ class E2 extends core::_Enum /*isEnum*/ { return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C9; enum-element static const field self::E3 element = #C8; + static const field core::List> values = #C9; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/inference_in_constructor_parameters.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/inference_in_constructor_parameters.dart.strong.outline.expect index feefc82784a0..be7dd49bf197 100644 --- a/pkg/front_end/testcases/enhanced_enums/inference_in_constructor_parameters.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/inference_in_constructor_parameters.dart.strong.outline.expect @@ -3,8 +3,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E1::bar]; enum-element static const field self::E1 bar = const self::E1::•(0, "bar", self::foo); + static const field core::List values = const [self::E1::bar]; const constructor •(core::int #index, core::String #name, (core::int) → core::int f) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -12,8 +12,8 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List> values = const >[self::E2::bar]; enum-element static const field self::E2<(X%) → X%> bar = const self::E2::•<(X%) → X%>(0, "bar", self::foo); + static const field core::List> values = const >[self::E2::bar]; const constructor •(core::int #index, core::String #name, self::E2::X% f) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -21,8 +21,8 @@ class E2 extends core::_Enum /*isEnum*/ { return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List> values = const >[self::E3::element]; enum-element static const field self::E3 element = const self::E3::•(0, "element"); + static const field core::List> values = const >[self::E3::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -36,10 +36,10 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///inference_in_constructor_parameters.dart:7:6 -> ListConstant(const [const E1{_Enum.index: 0, _Enum._name: "bar"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///inference_in_constructor_parameters.dart:8:3 -> InstanceConstant(const E1{_Enum.index: 0, _Enum._name: "bar"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///inference_in_constructor_parameters.dart:13:6 -> ListConstant(const >[const E2(X%)>{_Enum.index: 0, _Enum._name: "bar"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///inference_in_constructor_parameters.dart:7:6 -> ListConstant(const [const E1{_Enum.index: 0, _Enum._name: "bar"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///inference_in_constructor_parameters.dart:14:3 -> InstanceConstant(const E2(X%)>{_Enum.index: 0, _Enum._name: "bar"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///inference_in_constructor_parameters.dart:19:6 -> ListConstant(const >[const E3{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///inference_in_constructor_parameters.dart:13:6 -> ListConstant(const >[const E2(X%)>{_Enum.index: 0, _Enum._name: "bar"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///inference_in_constructor_parameters.dart:20:3 -> InstanceConstant(const E3{_Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///inference_in_constructor_parameters.dart:19:6 -> ListConstant(const >[const E3{_Enum.index: 0, _Enum._name: "element"}]) Extra constant evaluation: evaluated: 21, effectively constant: 6 diff --git a/pkg/front_end/testcases/enhanced_enums/inference_in_constructor_parameters.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/inference_in_constructor_parameters.dart.strong.transformed.expect index 5204e867d39b..13278c67c6a2 100644 --- a/pkg/front_end/testcases/enhanced_enums/inference_in_constructor_parameters.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/inference_in_constructor_parameters.dart.strong.transformed.expect @@ -3,8 +3,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E1 bar = #C3; + static const field core::List values = #C4; const constructor •(core::int #index, core::String #name, (core::int) → core::int f) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -12,8 +12,8 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C6; enum-element static const field self::E2<(X%) → X%> bar = #C5; + static const field core::List> values = #C6; const constructor •(core::int #index, core::String #name, self::E2::X% f) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -21,8 +21,8 @@ class E2 extends core::_Enum /*isEnum*/ { return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C9; enum-element static const field self::E3 element = #C8; + static const field core::List> values = #C9; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/inherited_restricted_members.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/inherited_restricted_members.dart.strong.expect index a12212fdbd8b..5dd553e26f8d 100644 --- a/pkg/front_end/testcases/enhanced_enums/inherited_restricted_members.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/inherited_restricted_members.dart.strong.expect @@ -90,8 +90,8 @@ abstract class _E1&_Enum&A1 = core::_Enum with self::A1 /*isAnonymousMixin,hasCo return super.{self::A1::hashCode}; } class E1 extends self::_E1&_Enum&A1 /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E1 element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super self::_E1&_Enum&A1::•(#index, #name) ; @@ -113,8 +113,8 @@ abstract class _E2&_Enum&A2 = core::_Enum with self::A2 /*isAnonymousMixin,hasCo return super.{self::A2::values}; } class E2 extends self::_E2&_Enum&A2 /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::E2 element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super self::_E2&_Enum&A2::•(#index, #name) ; @@ -136,8 +136,8 @@ abstract class _E3&_Enum&A3 = core::_Enum with self::A3 /*isAnonymousMixin,hasCo return super.{self::A3::index}; } class E3 extends self::_E3&_Enum&A3 /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::E3 element = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super self::_E3&_Enum&A3::•(#index, #name) ; @@ -159,8 +159,8 @@ abstract class _E4&_Enum&A4 = core::_Enum with self::A4 /*isAnonymousMixin,hasCo return super.{self::A4::==}(other); } class E4 extends self::_E4&_Enum&A4 /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E4 element = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super self::_E4&_Enum&A4::•(#index, #name) ; @@ -179,8 +179,8 @@ abstract class _E5&_Enum&M5 = core::_Enum with self::M5 /*isAnonymousMixin,hasCo return super.{self::M5::hashCode}; } class E5 extends self::_E5&_Enum&M5 /*isEnum*/ { - static const field core::List values = #C12; enum-element static const field self::E5 element = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super self::_E5&_Enum&M5::•(#index, #name) ; @@ -199,8 +199,8 @@ abstract class _E6&_Enum&M6 = core::_Enum with self::M6 /*isAnonymousMixin,hasCo return super.{self::M6::values}; } class E6 extends self::_E6&_Enum&M6 /*isEnum*/ { - static const field core::List values = #C14; enum-element static const field self::E6 element = #C13; + static const field core::List values = #C14; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super self::_E6&_Enum&M6::•(#index, #name) ; @@ -219,8 +219,8 @@ abstract class _E7&_Enum&M7 = core::_Enum with self::M7 /*isAnonymousMixin,hasCo return super.{self::M7::index}; } class E7 extends self::_E7&_Enum&M7 /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field self::E7 element = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super self::_E7&_Enum&M7::•(#index, #name) ; @@ -239,8 +239,8 @@ abstract class _E8&_Enum&M8 = core::_Enum with self::M8 /*isAnonymousMixin,hasCo return super.{self::M8::==}(other); } class E8 extends self::_E8&_Enum&M8 /*isEnum*/ { - static const field core::List values = #C18; enum-element static const field self::E8 element = #C17; + static const field core::List values = #C18; const synthetic constructor •(core::int #index, core::String #name) → self::E8 : super self::_E8&_Enum&M8::•(#index, #name) ; @@ -264,8 +264,8 @@ abstract class _E9&_Enum&A9 = core::_Enum with self::A9 /*isAnonymousMixin,hasCo abstract mixin-stub operator ==(core::Object other) → core::bool; -> self::A9::== } class E9 extends self::_E9&_Enum&A9 /*isEnum*/ { - static const field core::List values = #C20; enum-element static const field self::E9 element = #C19; + static const field core::List values = #C20; const synthetic constructor •(core::int #index, core::String #name) → self::E9 : super self::_E9&_Enum&A9::•(#index, #name) ; @@ -286,8 +286,8 @@ abstract class _E10&_Enum&M10 = core::_Enum with self::M10 /*isAnonymousMixin,ha abstract mixin-stub operator ==(core::Object other) → core::bool; -> self::M10::== } class E10 extends self::_E10&_Enum&M10 /*isEnum*/ { - static const field core::List values = #C22; enum-element static const field self::E10 element = #C21; + static const field core::List values = #C22; const synthetic constructor •(core::int #index, core::String #name) → self::E10 : super self::_E10&_Enum&M10::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/inherited_restricted_members.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/inherited_restricted_members.dart.strong.modular.expect index a12212fdbd8b..5dd553e26f8d 100644 --- a/pkg/front_end/testcases/enhanced_enums/inherited_restricted_members.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/inherited_restricted_members.dart.strong.modular.expect @@ -90,8 +90,8 @@ abstract class _E1&_Enum&A1 = core::_Enum with self::A1 /*isAnonymousMixin,hasCo return super.{self::A1::hashCode}; } class E1 extends self::_E1&_Enum&A1 /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E1 element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super self::_E1&_Enum&A1::•(#index, #name) ; @@ -113,8 +113,8 @@ abstract class _E2&_Enum&A2 = core::_Enum with self::A2 /*isAnonymousMixin,hasCo return super.{self::A2::values}; } class E2 extends self::_E2&_Enum&A2 /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::E2 element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super self::_E2&_Enum&A2::•(#index, #name) ; @@ -136,8 +136,8 @@ abstract class _E3&_Enum&A3 = core::_Enum with self::A3 /*isAnonymousMixin,hasCo return super.{self::A3::index}; } class E3 extends self::_E3&_Enum&A3 /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::E3 element = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super self::_E3&_Enum&A3::•(#index, #name) ; @@ -159,8 +159,8 @@ abstract class _E4&_Enum&A4 = core::_Enum with self::A4 /*isAnonymousMixin,hasCo return super.{self::A4::==}(other); } class E4 extends self::_E4&_Enum&A4 /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E4 element = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super self::_E4&_Enum&A4::•(#index, #name) ; @@ -179,8 +179,8 @@ abstract class _E5&_Enum&M5 = core::_Enum with self::M5 /*isAnonymousMixin,hasCo return super.{self::M5::hashCode}; } class E5 extends self::_E5&_Enum&M5 /*isEnum*/ { - static const field core::List values = #C12; enum-element static const field self::E5 element = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super self::_E5&_Enum&M5::•(#index, #name) ; @@ -199,8 +199,8 @@ abstract class _E6&_Enum&M6 = core::_Enum with self::M6 /*isAnonymousMixin,hasCo return super.{self::M6::values}; } class E6 extends self::_E6&_Enum&M6 /*isEnum*/ { - static const field core::List values = #C14; enum-element static const field self::E6 element = #C13; + static const field core::List values = #C14; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super self::_E6&_Enum&M6::•(#index, #name) ; @@ -219,8 +219,8 @@ abstract class _E7&_Enum&M7 = core::_Enum with self::M7 /*isAnonymousMixin,hasCo return super.{self::M7::index}; } class E7 extends self::_E7&_Enum&M7 /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field self::E7 element = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super self::_E7&_Enum&M7::•(#index, #name) ; @@ -239,8 +239,8 @@ abstract class _E8&_Enum&M8 = core::_Enum with self::M8 /*isAnonymousMixin,hasCo return super.{self::M8::==}(other); } class E8 extends self::_E8&_Enum&M8 /*isEnum*/ { - static const field core::List values = #C18; enum-element static const field self::E8 element = #C17; + static const field core::List values = #C18; const synthetic constructor •(core::int #index, core::String #name) → self::E8 : super self::_E8&_Enum&M8::•(#index, #name) ; @@ -264,8 +264,8 @@ abstract class _E9&_Enum&A9 = core::_Enum with self::A9 /*isAnonymousMixin,hasCo abstract mixin-stub operator ==(core::Object other) → core::bool; -> self::A9::== } class E9 extends self::_E9&_Enum&A9 /*isEnum*/ { - static const field core::List values = #C20; enum-element static const field self::E9 element = #C19; + static const field core::List values = #C20; const synthetic constructor •(core::int #index, core::String #name) → self::E9 : super self::_E9&_Enum&A9::•(#index, #name) ; @@ -286,8 +286,8 @@ abstract class _E10&_Enum&M10 = core::_Enum with self::M10 /*isAnonymousMixin,ha abstract mixin-stub operator ==(core::Object other) → core::bool; -> self::M10::== } class E10 extends self::_E10&_Enum&M10 /*isEnum*/ { - static const field core::List values = #C22; enum-element static const field self::E10 element = #C21; + static const field core::List values = #C22; const synthetic constructor •(core::int #index, core::String #name) → self::E10 : super self::_E10&_Enum&M10::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/inherited_restricted_members.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/inherited_restricted_members.dart.strong.outline.expect index 643b5886c7f6..890928c2ec2f 100644 --- a/pkg/front_end/testcases/enhanced_enums/inherited_restricted_members.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/inherited_restricted_members.dart.strong.outline.expect @@ -89,8 +89,8 @@ abstract class _E1&_Enum&A1 = core::_Enum with self::A1 /*isAnonymousMixin,hasCo return super.{self::A1::hashCode}; } class E1 extends self::_E1&_Enum&A1 /*isEnum*/ { - static const field core::List values = const [self::E1::element]; enum-element static const field self::E1 element = const self::E1::•(0, "element"); + static const field core::List values = const [self::E1::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super self::_E1&_Enum&A1::•(#index, #name) ; @@ -111,8 +111,8 @@ abstract class _E2&_Enum&A2 = core::_Enum with self::A2 /*isAnonymousMixin,hasCo return super.{self::A2::values}; } class E2 extends self::_E2&_Enum&A2 /*isEnum*/ { - static const field core::List values = const [self::E2::element]; enum-element static const field self::E2 element = const self::E2::•(0, "element"); + static const field core::List values = const [self::E2::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super self::_E2&_Enum&A2::•(#index, #name) ; @@ -133,8 +133,8 @@ abstract class _E3&_Enum&A3 = core::_Enum with self::A3 /*isAnonymousMixin,hasCo return super.{self::A3::index}; } class E3 extends self::_E3&_Enum&A3 /*isEnum*/ { - static const field core::List values = const [self::E3::element]; enum-element static const field self::E3 element = const self::E3::•(0, "element"); + static const field core::List values = const [self::E3::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super self::_E3&_Enum&A3::•(#index, #name) ; @@ -155,8 +155,8 @@ abstract class _E4&_Enum&A4 = core::_Enum with self::A4 /*isAnonymousMixin,hasCo return super.{self::A4::==}(other); } class E4 extends self::_E4&_Enum&A4 /*isEnum*/ { - static const field core::List values = const [self::E4::element]; enum-element static const field self::E4 element = const self::E4::•(0, "element"); + static const field core::List values = const [self::E4::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super self::_E4&_Enum&A4::•(#index, #name) ; @@ -175,8 +175,8 @@ abstract class _E5&_Enum&M5 = core::_Enum with self::M5 /*isAnonymousMixin,hasCo return super.{self::M5::hashCode}; } class E5 extends self::_E5&_Enum&M5 /*isEnum*/ { - static const field core::List values = const [self::E5::element]; enum-element static const field self::E5 element = const self::E5::•(0, "element"); + static const field core::List values = const [self::E5::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super self::_E5&_Enum&M5::•(#index, #name) ; @@ -195,8 +195,8 @@ abstract class _E6&_Enum&M6 = core::_Enum with self::M6 /*isAnonymousMixin,hasCo return super.{self::M6::values}; } class E6 extends self::_E6&_Enum&M6 /*isEnum*/ { - static const field core::List values = const [self::E6::element]; enum-element static const field self::E6 element = const self::E6::•(0, "element"); + static const field core::List values = const [self::E6::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super self::_E6&_Enum&M6::•(#index, #name) ; @@ -215,8 +215,8 @@ abstract class _E7&_Enum&M7 = core::_Enum with self::M7 /*isAnonymousMixin,hasCo return super.{self::M7::index}; } class E7 extends self::_E7&_Enum&M7 /*isEnum*/ { - static const field core::List values = const [self::E7::element]; enum-element static const field self::E7 element = const self::E7::•(0, "element"); + static const field core::List values = const [self::E7::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super self::_E7&_Enum&M7::•(#index, #name) ; @@ -235,8 +235,8 @@ abstract class _E8&_Enum&M8 = core::_Enum with self::M8 /*isAnonymousMixin,hasCo return super.{self::M8::==}(other); } class E8 extends self::_E8&_Enum&M8 /*isEnum*/ { - static const field core::List values = const [self::E8::element]; enum-element static const field self::E8 element = const self::E8::•(0, "element"); + static const field core::List values = const [self::E8::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E8 : super self::_E8&_Enum&M8::•(#index, #name) ; @@ -259,8 +259,8 @@ abstract class _E9&_Enum&A9 = core::_Enum with self::A9 /*isAnonymousMixin,hasCo abstract mixin-stub operator ==(core::Object other) → core::bool; -> self::A9::== } class E9 extends self::_E9&_Enum&A9 /*isEnum*/ { - static const field core::List values = const [self::E9::element]; enum-element static const field self::E9 element = const self::E9::•(0, "element"); + static const field core::List values = const [self::E9::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E9 : super self::_E9&_Enum&A9::•(#index, #name) ; @@ -281,8 +281,8 @@ abstract class _E10&_Enum&M10 = core::_Enum with self::M10 /*isAnonymousMixin,ha abstract mixin-stub operator ==(core::Object other) → core::bool; -> self::M10::== } class E10 extends self::_E10&_Enum&M10 /*isEnum*/ { - static const field core::List values = const [self::E10::element]; enum-element static const field self::E10 element = const self::E10::•(0, "element"); + static const field core::List values = const [self::E10::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E10 : super self::_E10&_Enum&M10::•(#index, #name) ; @@ -294,24 +294,24 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_restricted_members.dart:9:6 -> ListConstant(const [const E1{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///inherited_restricted_members.dart:10:3 -> InstanceConstant(const E1{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_restricted_members.dart:17:6 -> ListConstant(const [const E2{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_restricted_members.dart:9:6 -> ListConstant(const [const E1{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///inherited_restricted_members.dart:18:3 -> InstanceConstant(const E2{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_restricted_members.dart:25:6 -> ListConstant(const [const E3{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_restricted_members.dart:17:6 -> ListConstant(const [const E2{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///inherited_restricted_members.dart:26:3 -> InstanceConstant(const E3{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_restricted_members.dart:33:6 -> ListConstant(const [const E4{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_restricted_members.dart:25:6 -> ListConstant(const [const E3{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///inherited_restricted_members.dart:34:3 -> InstanceConstant(const E4{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_restricted_members.dart:41:6 -> ListConstant(const [const E5{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_restricted_members.dart:33:6 -> ListConstant(const [const E4{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///inherited_restricted_members.dart:42:3 -> InstanceConstant(const E5{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_restricted_members.dart:49:6 -> ListConstant(const [const E6{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_restricted_members.dart:41:6 -> ListConstant(const [const E5{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///inherited_restricted_members.dart:50:3 -> InstanceConstant(const E6{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_restricted_members.dart:57:6 -> ListConstant(const [const E7{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_restricted_members.dart:49:6 -> ListConstant(const [const E6{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///inherited_restricted_members.dart:58:3 -> InstanceConstant(const E7{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_restricted_members.dart:65:6 -> ListConstant(const [const E8{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_restricted_members.dart:57:6 -> ListConstant(const [const E7{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///inherited_restricted_members.dart:66:3 -> InstanceConstant(const E8{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_restricted_members.dart:75:6 -> ListConstant(const [const E9{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_restricted_members.dart:65:6 -> ListConstant(const [const E8{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///inherited_restricted_members.dart:76:3 -> InstanceConstant(const E9{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_restricted_members.dart:85:6 -> ListConstant(const [const E10{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_restricted_members.dart:75:6 -> ListConstant(const [const E9{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///inherited_restricted_members.dart:86:3 -> InstanceConstant(const E10{_Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///inherited_restricted_members.dart:85:6 -> ListConstant(const [const E10{_Enum.index: 0, _Enum._name: "element"}]) Extra constant evaluation: evaluated: 100, effectively constant: 20 diff --git a/pkg/front_end/testcases/enhanced_enums/inherited_restricted_members.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/inherited_restricted_members.dart.strong.transformed.expect index 40f0db38d646..57dcf2d35baf 100644 --- a/pkg/front_end/testcases/enhanced_enums/inherited_restricted_members.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/inherited_restricted_members.dart.strong.transformed.expect @@ -90,8 +90,8 @@ abstract class _E1&_Enum&A1 extends core::_Enum implements self::A1 /*isAnonymou return 42; } class E1 extends self::_E1&_Enum&A1 /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E1 element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super self::_E1&_Enum&A1::•(#index, #name) ; @@ -113,8 +113,8 @@ abstract class _E2&_Enum&A2 extends core::_Enum implements self::A2 /*isAnonymou return 42; } class E2 extends self::_E2&_Enum&A2 /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::E2 element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super self::_E2&_Enum&A2::•(#index, #name) ; @@ -136,8 +136,8 @@ abstract class _E3&_Enum&A3 extends core::_Enum implements self::A3 /*isAnonymou return 42; } class E3 extends self::_E3&_Enum&A3 /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::E3 element = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super self::_E3&_Enum&A3::•(#index, #name) ; @@ -159,8 +159,8 @@ abstract class _E4&_Enum&A4 extends core::_Enum implements self::A4 /*isAnonymou return true; } class E4 extends self::_E4&_Enum&A4 /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E4 element = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super self::_E4&_Enum&A4::•(#index, #name) ; @@ -179,8 +179,8 @@ abstract class _E5&_Enum&M5 extends core::_Enum implements self::M5 /*isAnonymou return 42; } class E5 extends self::_E5&_Enum&M5 /*isEnum*/ { - static const field core::List values = #C12; enum-element static const field self::E5 element = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super self::_E5&_Enum&M5::•(#index, #name) ; @@ -199,8 +199,8 @@ abstract class _E6&_Enum&M6 extends core::_Enum implements self::M6 /*isAnonymou return 42; } class E6 extends self::_E6&_Enum&M6 /*isEnum*/ { - static const field core::List values = #C14; enum-element static const field self::E6 element = #C13; + static const field core::List values = #C14; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super self::_E6&_Enum&M6::•(#index, #name) ; @@ -219,8 +219,8 @@ abstract class _E7&_Enum&M7 extends core::_Enum implements self::M7 /*isAnonymou return 42; } class E7 extends self::_E7&_Enum&M7 /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field self::E7 element = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super self::_E7&_Enum&M7::•(#index, #name) ; @@ -239,8 +239,8 @@ abstract class _E8&_Enum&M8 extends core::_Enum implements self::M8 /*isAnonymou return true; } class E8 extends self::_E8&_Enum&M8 /*isEnum*/ { - static const field core::List values = #C18; enum-element static const field self::E8 element = #C17; + static const field core::List values = #C18; const synthetic constructor •(core::int #index, core::String #name) → self::E8 : super self::_E8&_Enum&M8::•(#index, #name) ; @@ -264,8 +264,8 @@ abstract class _E9&_Enum&A9 extends core::_Enum implements self::A9 /*isAnonymou abstract operator ==(core::Object other) → core::bool; } class E9 extends self::_E9&_Enum&A9 /*isEnum*/ { - static const field core::List values = #C20; enum-element static const field self::E9 element = #C19; + static const field core::List values = #C20; const synthetic constructor •(core::int #index, core::String #name) → self::E9 : super self::_E9&_Enum&A9::•(#index, #name) ; @@ -286,8 +286,8 @@ abstract class _E10&_Enum&M10 extends core::_Enum implements self::M10 /*isAnony abstract operator ==(core::Object other) → core::bool; } class E10 extends self::_E10&_Enum&M10 /*isEnum*/ { - static const field core::List values = #C22; enum-element static const field self::E10 element = #C21; + static const field core::List values = #C22; const synthetic constructor •(core::int #index, core::String #name) → self::E10 : super self::_E10&_Enum&M10::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/instantiated_generic_enum_types.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/instantiated_generic_enum_types.dart.strong.expect index 98e67501b70c..3b9b90737c31 100644 --- a/pkg/front_end/testcases/enhanced_enums/instantiated_generic_enum_types.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/instantiated_generic_enum_types.dart.strong.expect @@ -48,10 +48,10 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - final field self::E::X% field; - static const field core::List> values = #C8; enum-element static const field self::E one = #C4; enum-element static const field self::E two = #C7; + final field self::E::X% field; + static const field core::List> values = #C8; const constructor •(core::int #index, core::String #name, self::E::X% field) → self::E : self::E::field = field, super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/instantiated_generic_enum_types.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/instantiated_generic_enum_types.dart.strong.modular.expect index 98e67501b70c..3b9b90737c31 100644 --- a/pkg/front_end/testcases/enhanced_enums/instantiated_generic_enum_types.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/instantiated_generic_enum_types.dart.strong.modular.expect @@ -48,10 +48,10 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - final field self::E::X% field; - static const field core::List> values = #C8; enum-element static const field self::E one = #C4; enum-element static const field self::E two = #C7; + final field self::E::X% field; + static const field core::List> values = #C8; const constructor •(core::int #index, core::String #name, self::E::X% field) → self::E : self::E::field = field, super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/instantiated_generic_enum_types.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/instantiated_generic_enum_types.dart.strong.outline.expect index 8fdf2e9da483..fb31c6c58fcc 100644 --- a/pkg/front_end/testcases/enhanced_enums/instantiated_generic_enum_types.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/instantiated_generic_enum_types.dart.strong.outline.expect @@ -3,10 +3,10 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - final field self::E::X% field; - static const field core::List> values = const >[self::E::one, self::E::two]; enum-element static const field self::E one = const self::E::•(0, "one", 1); enum-element static const field self::E two = const self::E::•(1, "two", "2"); + final field self::E::X% field; + static const field core::List> values = const >[self::E::one, self::E::two]; const constructor •(core::int #index, core::String #name, self::E::X% field) → self::E : self::E::field = field, super core::_Enum::•(#index, #name) ; @@ -32,7 +32,7 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///instantiated_generic_enum_types.dart:5:6 -> ListConstant(const >[const E{E.field: 1, _Enum.index: 0, _Enum._name: "one"}, const E{E.field: "2", _Enum.index: 1, _Enum._name: "two"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///instantiated_generic_enum_types.dart:6:3 -> InstanceConstant(const E{E.field: 1, _Enum.index: 0, _Enum._name: "one"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///instantiated_generic_enum_types.dart:7:3 -> InstanceConstant(const E{E.field: "2", _Enum.index: 1, _Enum._name: "two"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///instantiated_generic_enum_types.dart:5:6 -> ListConstant(const >[const E{E.field: 1, _Enum.index: 0, _Enum._name: "one"}, const E{E.field: "2", _Enum.index: 1, _Enum._name: "two"}]) Extra constant evaluation: evaluated: 9, effectively constant: 3 diff --git a/pkg/front_end/testcases/enhanced_enums/instantiated_generic_enum_types.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/instantiated_generic_enum_types.dart.strong.transformed.expect index 98e67501b70c..3b9b90737c31 100644 --- a/pkg/front_end/testcases/enhanced_enums/instantiated_generic_enum_types.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/instantiated_generic_enum_types.dart.strong.transformed.expect @@ -48,10 +48,10 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - final field self::E::X% field; - static const field core::List> values = #C8; enum-element static const field self::E one = #C4; enum-element static const field self::E two = #C7; + final field self::E::X% field; + static const field core::List> values = #C8; const constructor •(core::int #index, core::String #name, self::E::X% field) → self::E : self::E::field = field, super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/issue48084.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/issue48084.dart.strong.expect index 61319ace22d4..bfcff38a2839 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue48084.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue48084.dart.strong.expect @@ -3,10 +3,10 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - final field core::String field; - static const field core::List values = #C9; enum-element static const field self::E one = #C4; enum-element static const field self::E two = #C8; + final field core::String field; + static const field core::List values = #C9; const constructor •(core::int #index, core::String #name, core::String field) → self::E : self::E::field = field, super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/issue48084.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/issue48084.dart.strong.modular.expect index 61319ace22d4..bfcff38a2839 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue48084.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue48084.dart.strong.modular.expect @@ -3,10 +3,10 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - final field core::String field; - static const field core::List values = #C9; enum-element static const field self::E one = #C4; enum-element static const field self::E two = #C8; + final field core::String field; + static const field core::List values = #C9; const constructor •(core::int #index, core::String #name, core::String field) → self::E : self::E::field = field, super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/issue48084.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/issue48084.dart.strong.outline.expect index c7b01e3ced8b..4991974b86f3 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue48084.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue48084.dart.strong.outline.expect @@ -3,10 +3,10 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - final field core::String field; - static const field core::List values = const [self::E::one, self::E::two]; enum-element static const field self::E one = const self::E::•(0, "one", "foo"); enum-element static const field self::E two = const self::E::•(1, "two", "bar"); + final field core::String field; + static const field core::List values = const [self::E::one, self::E::two]; const constructor •(core::int #index, core::String #name, core::String field) → self::E : self::E::field = field, super core::_Enum::•(#index, #name) ; @@ -24,7 +24,7 @@ static method main() → dynamic Extra constant evaluation status: Evaluated: StaticGet @ org-dartlang-testcase:///issue48084.dart:13:4 -> InstanceConstant(const _Override{}) -Evaluated: ListLiteral @ org-dartlang-testcase:///issue48084.dart:5:6 -> ListConstant(const [const E{E.field: "foo", _Enum.index: 0, _Enum._name: "one"}, const E{E.field: "bar", _Enum.index: 1, _Enum._name: "two"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue48084.dart:6:3 -> InstanceConstant(const E{E.field: "foo", _Enum.index: 0, _Enum._name: "one"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue48084.dart:7:3 -> InstanceConstant(const E{E.field: "bar", _Enum.index: 1, _Enum._name: "two"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///issue48084.dart:5:6 -> ListConstant(const [const E{E.field: "foo", _Enum.index: 0, _Enum._name: "one"}, const E{E.field: "bar", _Enum.index: 1, _Enum._name: "two"}]) Extra constant evaluation: evaluated: 10, effectively constant: 4 diff --git a/pkg/front_end/testcases/enhanced_enums/issue48084.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/issue48084.dart.strong.transformed.expect index 61319ace22d4..bfcff38a2839 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue48084.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue48084.dart.strong.transformed.expect @@ -3,10 +3,10 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - final field core::String field; - static const field core::List values = #C9; enum-element static const field self::E one = #C4; enum-element static const field self::E two = #C8; + final field core::String field; + static const field core::List values = #C9; const constructor •(core::int #index, core::String #name, core::String field) → self::E : self::E::field = field, super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/issue48181.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/issue48181.dart.strong.expect index 09c10d850116..079292e20b7a 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue48181.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue48181.dart.strong.expect @@ -18,9 +18,9 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::E e1 = #C3; enum-element static const field self::E e2 = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; @@ -30,9 +30,6 @@ class E extends core::_Enum /*isEnum*/ { return #C7.{core::List::[]}(i){(core::int) → self::E}; } class F extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/issue48181.dart:12:3: Error: Couldn't find constructor 'F'. - f1, - ^"; enum-element static const field self::F f1 = invalid-expression "pkg/front_end/testcases/enhanced_enums/issue48181.dart:12:3: Error: Couldn't find constructor 'F'. f1, ^"; @@ -42,6 +39,9 @@ class F extends core::_Enum /*isEnum*/ { enum-element static const field self::F f3 = invalid-expression "pkg/front_end/testcases/enhanced_enums/issue48181.dart:14:6: Error: Couldn't find constructor 'F.foo'. f3.foo(); ^^^"; + static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/issue48181.dart:12:3: Error: Couldn't find constructor 'F'. + f1, + ^"; method _enumToString() → core::String return "F.${this.{core::_Enum::_name}{core::String}}"; static factory •(core::int i) → self::F diff --git a/pkg/front_end/testcases/enhanced_enums/issue48181.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/issue48181.dart.strong.modular.expect index 09c10d850116..079292e20b7a 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue48181.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue48181.dart.strong.modular.expect @@ -18,9 +18,9 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::E e1 = #C3; enum-element static const field self::E e2 = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; @@ -30,9 +30,6 @@ class E extends core::_Enum /*isEnum*/ { return #C7.{core::List::[]}(i){(core::int) → self::E}; } class F extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/issue48181.dart:12:3: Error: Couldn't find constructor 'F'. - f1, - ^"; enum-element static const field self::F f1 = invalid-expression "pkg/front_end/testcases/enhanced_enums/issue48181.dart:12:3: Error: Couldn't find constructor 'F'. f1, ^"; @@ -42,6 +39,9 @@ class F extends core::_Enum /*isEnum*/ { enum-element static const field self::F f3 = invalid-expression "pkg/front_end/testcases/enhanced_enums/issue48181.dart:14:6: Error: Couldn't find constructor 'F.foo'. f3.foo(); ^^^"; + static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/issue48181.dart:12:3: Error: Couldn't find constructor 'F'. + f1, + ^"; method _enumToString() → core::String return "F.${this.{core::_Enum::_name}{core::String}}"; static factory •(core::int i) → self::F diff --git a/pkg/front_end/testcases/enhanced_enums/issue48181.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/issue48181.dart.strong.outline.expect index 7e1f0917966d..fc6f0192cb04 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue48181.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue48181.dart.strong.outline.expect @@ -18,9 +18,9 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E::e1, self::E::e2]; enum-element static const field self::E e1 = const self::E::•(0, "e1"); enum-element static const field self::E e2 = const self::E::•(1, "e2"); + static const field core::List values = const [self::E::e1, self::E::e2]; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; @@ -30,7 +30,6 @@ class E extends core::_Enum /*isEnum*/ { ; } class F extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::F::f1, self::F::f2, self::F::f3]; enum-element static const field self::F f1 = invalid-expression "pkg/front_end/testcases/enhanced_enums/issue48181.dart:12:3: Error: Couldn't find constructor 'F'. f1, ^"; @@ -40,6 +39,7 @@ class F extends core::_Enum /*isEnum*/ { enum-element static const field self::F f3 = invalid-expression "pkg/front_end/testcases/enhanced_enums/issue48181.dart:14:6: Error: Couldn't find constructor 'F.foo'. f3.foo(); ^^^"; + static const field core::List values = const [self::F::f1, self::F::f2, self::F::f3]; method _enumToString() → core::String return "F.${this.{core::_Enum::_name}{core::String}}"; static factory •(core::int i) → self::F @@ -50,7 +50,7 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///issue48181.dart:5:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "e1"}, const E{_Enum.index: 1, _Enum._name: "e2"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue48181.dart:6:3 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "e1"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue48181.dart:7:3 -> InstanceConstant(const E{_Enum.index: 1, _Enum._name: "e2"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///issue48181.dart:5:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "e1"}, const E{_Enum.index: 1, _Enum._name: "e2"}]) Extra constant evaluation: evaluated: 15, effectively constant: 3 diff --git a/pkg/front_end/testcases/enhanced_enums/issue48181.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/issue48181.dart.strong.transformed.expect index 09c10d850116..079292e20b7a 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue48181.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue48181.dart.strong.transformed.expect @@ -18,9 +18,9 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::E e1 = #C3; enum-element static const field self::E e2 = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; @@ -30,9 +30,6 @@ class E extends core::_Enum /*isEnum*/ { return #C7.{core::List::[]}(i){(core::int) → self::E}; } class F extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/issue48181.dart:12:3: Error: Couldn't find constructor 'F'. - f1, - ^"; enum-element static const field self::F f1 = invalid-expression "pkg/front_end/testcases/enhanced_enums/issue48181.dart:12:3: Error: Couldn't find constructor 'F'. f1, ^"; @@ -42,6 +39,9 @@ class F extends core::_Enum /*isEnum*/ { enum-element static const field self::F f3 = invalid-expression "pkg/front_end/testcases/enhanced_enums/issue48181.dart:14:6: Error: Couldn't find constructor 'F.foo'. f3.foo(); ^^^"; + static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/issue48181.dart:12:3: Error: Couldn't find constructor 'F'. + f1, + ^"; method _enumToString() → core::String return "F.${this.{core::_Enum::_name}{core::String}}"; static factory •(core::int i) → self::F diff --git a/pkg/front_end/testcases/enhanced_enums/issue48232.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/issue48232.dart.strong.expect index 18ac47a41951..d9488e855563 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue48232.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue48232.dart.strong.expect @@ -3,8 +3,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E v = #C3; + static const field core::List values = #C4; const constructor •(core::int #index, core::String #name, wildcard dynamic _#wc0#formal) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/issue48232.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/issue48232.dart.strong.modular.expect index 18ac47a41951..d9488e855563 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue48232.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue48232.dart.strong.modular.expect @@ -3,8 +3,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E v = #C3; + static const field core::List values = #C4; const constructor •(core::int #index, core::String #name, wildcard dynamic _#wc0#formal) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/issue48232.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/issue48232.dart.strong.outline.expect index b9e9efe00152..f43a4dea00f3 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue48232.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue48232.dart.strong.outline.expect @@ -3,8 +3,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E::v]; enum-element static const field self::E v = const self::E::•(0, "v", const []); + static const field core::List values = const [self::E::v]; const constructor •(core::int #index, core::String #name, wildcard dynamic _#wc0#formal) → self::E : super core::_Enum::•(#index, #name) ; @@ -16,6 +16,6 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///issue48232.dart:5:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "v"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue48232.dart:6:5 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "v"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///issue48232.dart:5:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "v"}]) Extra constant evaluation: evaluated: 7, effectively constant: 2 diff --git a/pkg/front_end/testcases/enhanced_enums/issue48232.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/issue48232.dart.strong.transformed.expect index 18ac47a41951..d9488e855563 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue48232.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue48232.dart.strong.transformed.expect @@ -3,8 +3,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E v = #C3; + static const field core::List values = #C4; const constructor •(core::int #index, core::String #name, wildcard dynamic _#wc0#formal) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/issue48303.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/issue48303.dart.strong.expect index 2e34623c357b..223767cd1389 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue48303.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue48303.dart.strong.expect @@ -14,10 +14,10 @@ abstract class _E&_Enum&M1 = core::_Enum with self::M1 /*isAnonymousMixin,hasCon return super.{self::M1::mixedInMethod1}(v); } class E extends self::_E&_Enum&M1 /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E e1 = #C3; enum-element static const field self::E e2 = #C6; enum-element static const field self::E e3 = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E : super self::_E&_Enum&M1::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/issue48303.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/issue48303.dart.strong.modular.expect index 2e34623c357b..223767cd1389 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue48303.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue48303.dart.strong.modular.expect @@ -14,10 +14,10 @@ abstract class _E&_Enum&M1 = core::_Enum with self::M1 /*isAnonymousMixin,hasCon return super.{self::M1::mixedInMethod1}(v); } class E extends self::_E&_Enum&M1 /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E e1 = #C3; enum-element static const field self::E e2 = #C6; enum-element static const field self::E e3 = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E : super self::_E&_Enum&M1::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/issue48303.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/issue48303.dart.strong.outline.expect index 28df81789fcf..2fe9343dbc59 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue48303.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue48303.dart.strong.outline.expect @@ -14,10 +14,10 @@ abstract class _E&_Enum&M1 = core::_Enum with self::M1 /*isAnonymousMixin,hasCon return super.{self::M1::mixedInMethod1}(v); } class E extends self::_E&_Enum&M1 /*isEnum*/ { - static const field core::List values = const [self::E::e1, self::E::e2, self::E::e3]; enum-element static const field self::E e1 = const self::E::•(0, "e1"); enum-element static const field self::E e2 = const self::E::•(1, "e2"); enum-element static const field self::E e3 = const self::E::•(2, "e3"); + static const field core::List values = const [self::E::e1, self::E::e2, self::E::e3]; const synthetic constructor •(core::int #index, core::String #name) → self::E : super self::_E&_Enum&M1::•(#index, #name) ; @@ -31,8 +31,8 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///issue48303.dart:9:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "e1"}, const E{_Enum.index: 1, _Enum._name: "e2"}, const E{_Enum.index: 2, _Enum._name: "e3"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue48303.dart:10:3 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "e1"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue48303.dart:11:3 -> InstanceConstant(const E{_Enum.index: 1, _Enum._name: "e2"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue48303.dart:12:3 -> InstanceConstant(const E{_Enum.index: 2, _Enum._name: "e3"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///issue48303.dart:9:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "e1"}, const E{_Enum.index: 1, _Enum._name: "e2"}, const E{_Enum.index: 2, _Enum._name: "e3"}]) Extra constant evaluation: evaluated: 13, effectively constant: 4 diff --git a/pkg/front_end/testcases/enhanced_enums/issue48303.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/issue48303.dart.strong.transformed.expect index 28125d923d63..794153f7e068 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue48303.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue48303.dart.strong.transformed.expect @@ -14,10 +14,10 @@ abstract class _E&_Enum&M1 extends core::_Enum implements self::M1 /*isAnonymous return v; } class E extends self::_E&_Enum&M1 /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E e1 = #C3; enum-element static const field self::E e2 = #C6; enum-element static const field self::E e3 = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E : super self::_E&_Enum&M1::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/issue49236.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/issue49236.dart.strong.expect index db5e67102610..d3b09da3f9d9 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue49236.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue49236.dart.strong.expect @@ -28,8 +28,8 @@ abstract class _E1&_Enum&M = core::_Enum with self::M /*isAnonymousMixin,hasCons return super.{self::M::toString}(); } class E1 extends self::_E1&_Enum&M /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E1 element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super self::_E1&_Enum&M::•(#index, #name) ; @@ -44,8 +44,8 @@ abstract class _E2&_Enum&M = core::_Enum with self::M /*isAnonymousMixin,hasCons return super.{self::M::toString}(); } class E2 extends self::_E2&_Enum&M /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::E2 element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super self::_E2&_Enum&M::•(#index, #name) ; @@ -55,8 +55,8 @@ class E2 extends self::_E2&_Enum&M /*isEnum*/ { return "E2"; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::E3 element = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -66,8 +66,8 @@ class E3 extends core::_Enum /*isEnum*/ { return "E3"; } class E4 extends core::_Enum implements self::B /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E4 element = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super core::_Enum::•(#index, #name) ; @@ -75,8 +75,8 @@ class E4 extends core::_Enum implements self::B /*isEnum*/ { return "E4.${this.{core::_Enum::_name}{core::String}}"; } class E5 extends core::_Enum implements self::B /*isEnum*/ { - static const field core::List values = #C12; enum-element static const field self::E5 element = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super core::_Enum::•(#index, #name) ; @@ -93,8 +93,8 @@ abstract class _E6&_Enum&A = core::_Enum with self::A /*isAnonymousMixin,hasCons return super.{self::A::toString}(); } class E6 extends self::_E6&_Enum&A /*isEnum*/ { - static const field core::List values = #C14; enum-element static const field self::E6 element = #C13; + static const field core::List values = #C14; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super self::_E6&_Enum&A::•(#index, #name) ; @@ -109,8 +109,8 @@ abstract class _E7&_Enum&A = core::_Enum with self::A /*isAnonymousMixin,hasCons return super.{self::A::toString}(); } class E7 extends self::_E7&_Enum&A /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field self::E7 element = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super self::_E7&_Enum&A::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/issue49236.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/issue49236.dart.strong.modular.expect index db5e67102610..d3b09da3f9d9 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue49236.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue49236.dart.strong.modular.expect @@ -28,8 +28,8 @@ abstract class _E1&_Enum&M = core::_Enum with self::M /*isAnonymousMixin,hasCons return super.{self::M::toString}(); } class E1 extends self::_E1&_Enum&M /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E1 element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super self::_E1&_Enum&M::•(#index, #name) ; @@ -44,8 +44,8 @@ abstract class _E2&_Enum&M = core::_Enum with self::M /*isAnonymousMixin,hasCons return super.{self::M::toString}(); } class E2 extends self::_E2&_Enum&M /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::E2 element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super self::_E2&_Enum&M::•(#index, #name) ; @@ -55,8 +55,8 @@ class E2 extends self::_E2&_Enum&M /*isEnum*/ { return "E2"; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::E3 element = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -66,8 +66,8 @@ class E3 extends core::_Enum /*isEnum*/ { return "E3"; } class E4 extends core::_Enum implements self::B /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E4 element = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super core::_Enum::•(#index, #name) ; @@ -75,8 +75,8 @@ class E4 extends core::_Enum implements self::B /*isEnum*/ { return "E4.${this.{core::_Enum::_name}{core::String}}"; } class E5 extends core::_Enum implements self::B /*isEnum*/ { - static const field core::List values = #C12; enum-element static const field self::E5 element = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super core::_Enum::•(#index, #name) ; @@ -93,8 +93,8 @@ abstract class _E6&_Enum&A = core::_Enum with self::A /*isAnonymousMixin,hasCons return super.{self::A::toString}(); } class E6 extends self::_E6&_Enum&A /*isEnum*/ { - static const field core::List values = #C14; enum-element static const field self::E6 element = #C13; + static const field core::List values = #C14; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super self::_E6&_Enum&A::•(#index, #name) ; @@ -109,8 +109,8 @@ abstract class _E7&_Enum&A = core::_Enum with self::A /*isAnonymousMixin,hasCons return super.{self::A::toString}(); } class E7 extends self::_E7&_Enum&A /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field self::E7 element = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super self::_E7&_Enum&A::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/issue49236.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/issue49236.dart.strong.outline.expect index 56645b26b89e..16751819d59e 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue49236.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue49236.dart.strong.outline.expect @@ -26,8 +26,8 @@ abstract class _E1&_Enum&M = core::_Enum with self::M /*isAnonymousMixin,hasCons return super.{self::M::toString}(); } class E1 extends self::_E1&_Enum&M /*isEnum*/ { - static const field core::List values = const [self::E1::element]; enum-element static const field self::E1 element = const self::E1::•(0, "element"); + static const field core::List values = const [self::E1::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super self::_E1&_Enum&M::•(#index, #name) ; @@ -42,8 +42,8 @@ abstract class _E2&_Enum&M = core::_Enum with self::M /*isAnonymousMixin,hasCons return super.{self::M::toString}(); } class E2 extends self::_E2&_Enum&M /*isEnum*/ { - static const field core::List values = const [self::E2::element]; enum-element static const field self::E2 element = const self::E2::•(0, "element"); + static const field core::List values = const [self::E2::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super self::_E2&_Enum&M::•(#index, #name) ; @@ -53,8 +53,8 @@ class E2 extends self::_E2&_Enum&M /*isEnum*/ { ; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E3::element]; enum-element static const field self::E3 element = const self::E3::•(0, "element"); + static const field core::List values = const [self::E3::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -64,8 +64,8 @@ class E3 extends core::_Enum /*isEnum*/ { ; } class E4 extends core::_Enum implements self::B /*isEnum*/ { - static const field core::List values = const [self::E4::element]; enum-element static const field self::E4 element = const self::E4::•(0, "element"); + static const field core::List values = const [self::E4::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super core::_Enum::•(#index, #name) ; @@ -73,8 +73,8 @@ class E4 extends core::_Enum implements self::B /*isEnum*/ { return "E4.${this.{core::_Enum::_name}{core::String}}"; } class E5 extends core::_Enum implements self::B /*isEnum*/ { - static const field core::List values = const [self::E5::element]; enum-element static const field self::E5 element = const self::E5::•(0, "element"); + static const field core::List values = const [self::E5::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super core::_Enum::•(#index, #name) ; @@ -91,8 +91,8 @@ abstract class _E6&_Enum&A = core::_Enum with self::A /*isAnonymousMixin,hasCons return super.{self::A::toString}(); } class E6 extends self::_E6&_Enum&A /*isEnum*/ { - static const field core::List values = const [self::E6::element]; enum-element static const field self::E6 element = const self::E6::•(0, "element"); + static const field core::List values = const [self::E6::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super self::_E6&_Enum&A::•(#index, #name) ; @@ -107,8 +107,8 @@ abstract class _E7&_Enum&A = core::_Enum with self::A /*isAnonymousMixin,hasCons return super.{self::A::toString}(); } class E7 extends self::_E7&_Enum&A /*isEnum*/ { - static const field core::List values = const [self::E7::element]; enum-element static const field self::E7 element = const self::E7::•(0, "element"); + static const field core::List values = const [self::E7::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super self::_E7&_Enum&A::•(#index, #name) ; @@ -124,18 +124,18 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///issue49236.dart:17:6 -> ListConstant(const [const E1{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue49236.dart:17:18 -> InstanceConstant(const E1{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///issue49236.dart:19:6 -> ListConstant(const [const E2{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///issue49236.dart:17:6 -> ListConstant(const [const E1{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue49236.dart:20:3 -> InstanceConstant(const E2{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///issue49236.dart:25:6 -> ListConstant(const [const E3{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///issue49236.dart:19:6 -> ListConstant(const [const E2{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue49236.dart:26:3 -> InstanceConstant(const E3{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///issue49236.dart:31:6 -> ListConstant(const [const E4{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///issue49236.dart:25:6 -> ListConstant(const [const E3{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue49236.dart:31:24 -> InstanceConstant(const E4{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///issue49236.dart:33:6 -> ListConstant(const [const E5{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///issue49236.dart:31:6 -> ListConstant(const [const E4{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue49236.dart:34:3 -> InstanceConstant(const E5{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///issue49236.dart:39:6 -> ListConstant(const [const E6{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///issue49236.dart:33:6 -> ListConstant(const [const E5{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue49236.dart:39:18 -> InstanceConstant(const E6{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///issue49236.dart:41:6 -> ListConstant(const [const E7{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///issue49236.dart:39:6 -> ListConstant(const [const E6{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue49236.dart:42:3 -> InstanceConstant(const E7{_Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///issue49236.dart:41:6 -> ListConstant(const [const E7{_Enum.index: 0, _Enum._name: "element"}]) Extra constant evaluation: evaluated: 61, effectively constant: 14 diff --git a/pkg/front_end/testcases/enhanced_enums/issue49236.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/issue49236.dart.strong.transformed.expect index f550d2d1a165..cbc63ebc5aa1 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue49236.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue49236.dart.strong.transformed.expect @@ -28,8 +28,8 @@ abstract class _E1&_Enum&M extends core::_Enum implements self::M /*isAnonymousM return "M"; } class E1 extends self::_E1&_Enum&M /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E1 element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super self::_E1&_Enum&M::•(#index, #name) ; @@ -44,8 +44,8 @@ abstract class _E2&_Enum&M extends core::_Enum implements self::M /*isAnonymousM return "M"; } class E2 extends self::_E2&_Enum&M /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::E2 element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super self::_E2&_Enum&M::•(#index, #name) ; @@ -55,8 +55,8 @@ class E2 extends self::_E2&_Enum&M /*isEnum*/ { return "E2"; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::E3 element = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -66,8 +66,8 @@ class E3 extends core::_Enum /*isEnum*/ { return "E3"; } class E4 extends core::_Enum implements self::B /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E4 element = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super core::_Enum::•(#index, #name) ; @@ -75,8 +75,8 @@ class E4 extends core::_Enum implements self::B /*isEnum*/ { return "E4.${this.{core::_Enum::_name}{core::String}}"; } class E5 extends core::_Enum implements self::B /*isEnum*/ { - static const field core::List values = #C12; enum-element static const field self::E5 element = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super core::_Enum::•(#index, #name) ; @@ -93,8 +93,8 @@ abstract class _E6&_Enum&A extends core::_Enum implements self::A /*isAnonymousM return "A"; } class E6 extends self::_E6&_Enum&A /*isEnum*/ { - static const field core::List values = #C14; enum-element static const field self::E6 element = #C13; + static const field core::List values = #C14; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super self::_E6&_Enum&A::•(#index, #name) ; @@ -109,8 +109,8 @@ abstract class _E7&_Enum&A extends core::_Enum implements self::A /*isAnonymousM return "A"; } class E7 extends self::_E7&_Enum&A /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field self::E7 element = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super self::_E7&_Enum&A::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/issue49429.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/issue49429.dart.strong.expect index b6aec858cefd..b7a2c301be4b 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue49429.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue49429.dart.strong.expect @@ -10,8 +10,8 @@ class A extends core::Object /*hasConstConstructor*/ { return new self::A::•(); } class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E element = #C3; + static const field core::List values = #C4; const constructor •(core::int #index, core::String #name, self::A a) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/issue49429.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/issue49429.dart.strong.modular.expect index b6aec858cefd..b7a2c301be4b 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue49429.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue49429.dart.strong.modular.expect @@ -10,8 +10,8 @@ class A extends core::Object /*hasConstConstructor*/ { return new self::A::•(); } class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E element = #C3; + static const field core::List values = #C4; const constructor •(core::int #index, core::String #name, self::A a) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/issue49429.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/issue49429.dart.strong.outline.expect index d350e92d9239..80a28a9ccc43 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue49429.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue49429.dart.strong.outline.expect @@ -10,8 +10,8 @@ class A extends core::Object /*hasConstConstructor*/ { return new self::A::•(); } class E extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E::element]; enum-element static const field self::E element = const self::E::•(0, "element", const self::A::•()); + static const field core::List values = const [self::E::element]; const constructor •(core::int #index, core::String #name, self::A a) → self::E : super core::_Enum::•(#index, #name) ; @@ -23,6 +23,6 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///issue49429.dart:6:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue49429.dart:7:3 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///issue49429.dart:6:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "element"}]) Extra constant evaluation: evaluated: 8, effectively constant: 2 diff --git a/pkg/front_end/testcases/enhanced_enums/issue49429.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/issue49429.dart.strong.transformed.expect index b6aec858cefd..b7a2c301be4b 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue49429.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue49429.dart.strong.transformed.expect @@ -10,8 +10,8 @@ class A extends core::Object /*hasConstConstructor*/ { return new self::A::•(); } class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E element = #C3; + static const field core::List values = #C4; const constructor •(core::int #index, core::String #name, self::A a) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/issue51189.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/issue51189.dart.strong.expect index 63eff77e0da4..e624fffe65e1 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue51189.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue51189.dart.strong.expect @@ -8,8 +8,8 @@ class A extends core::Object { ; } class E extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C4; enum-element static const field self::E element = #C3; + static const field core::List> values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/issue51189.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/issue51189.dart.strong.modular.expect index 63eff77e0da4..e624fffe65e1 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue51189.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue51189.dart.strong.modular.expect @@ -8,8 +8,8 @@ class A extends core::Object { ; } class E extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C4; enum-element static const field self::E element = #C3; + static const field core::List> values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/issue51189.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/issue51189.dart.strong.outline.expect index 20d2657fdaf0..fec5a9bb8423 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue51189.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue51189.dart.strong.outline.expect @@ -7,8 +7,8 @@ class A extends core::Object { ; } class E extends core::_Enum /*isEnum*/ { - static const field core::List> values = const >[self::E::element]; enum-element static const field self::E element = const self::E::•(0, "element"); + static const field core::List> values = const >[self::E::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; @@ -22,6 +22,6 @@ static method expectEquals(dynamic x, dynamic y) → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///issue51189.dart:7:6 -> ListConstant(const >[const E{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue51189.dart:8:3 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///issue51189.dart:7:6 -> ListConstant(const >[const E{_Enum.index: 0, _Enum._name: "element"}]) Extra constant evaluation: evaluated: 7, effectively constant: 2 diff --git a/pkg/front_end/testcases/enhanced_enums/issue51189.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/issue51189.dart.strong.transformed.expect index 63eff77e0da4..e624fffe65e1 100644 --- a/pkg/front_end/testcases/enhanced_enums/issue51189.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/issue51189.dart.strong.transformed.expect @@ -8,8 +8,8 @@ class A extends core::Object { ; } class E extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C4; enum-element static const field self::E element = #C3; + static const field core::List> values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart.strong.expect index e9794e205c67..560f8ab3e706 100644 --- a/pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart.strong.expect @@ -27,11 +27,11 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:6:3: Error: Cannot invoke a non-'const' constructor where a const expression is expected. + enum-element static const field invalid-type element = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:6:3: Error: Cannot invoke a non-'const' constructor where a const expression is expected. Try using a constructor or factory that is 'const'. element; ^"; - enum-element static const field invalid-type element = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:6:3: Error: Cannot invoke a non-'const' constructor where a const expression is expected. + static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:6:3: Error: Cannot invoke a non-'const' constructor where a const expression is expected. Try using a constructor or factory that is 'const'. element; ^"; @@ -45,15 +45,15 @@ Try using a constructor or factory that is 'const'. return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:16:23: Error: Enum constructors can't contain super-initializers. - const E2.named1() : super(); // Error. - ^"; enum-element static const field self::E2 one = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:16:23: Error: Enum constructors can't contain super-initializers. const E2.named1() : super(); // Error. ^"; enum-element static const field self::E2 two = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:17:23: Error: Enum constructors can't contain super-initializers. const E2.named2() : super(42, \"42\"); // Error. ^"; + static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:16:23: Error: Enum constructors can't contain super-initializers. + const E2.named1() : super(); // Error. + ^"; const constructor named1(core::int #index, core::String #name) → self::E2 : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:16:23: Error: Enum constructors can't contain super-initializers. const E2.named1() : super(); // Error. diff --git a/pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart.strong.modular.expect index e9794e205c67..560f8ab3e706 100644 --- a/pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart.strong.modular.expect @@ -27,11 +27,11 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:6:3: Error: Cannot invoke a non-'const' constructor where a const expression is expected. + enum-element static const field invalid-type element = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:6:3: Error: Cannot invoke a non-'const' constructor where a const expression is expected. Try using a constructor or factory that is 'const'. element; ^"; - enum-element static const field invalid-type element = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:6:3: Error: Cannot invoke a non-'const' constructor where a const expression is expected. + static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:6:3: Error: Cannot invoke a non-'const' constructor where a const expression is expected. Try using a constructor or factory that is 'const'. element; ^"; @@ -45,15 +45,15 @@ Try using a constructor or factory that is 'const'. return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:16:23: Error: Enum constructors can't contain super-initializers. - const E2.named1() : super(); // Error. - ^"; enum-element static const field self::E2 one = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:16:23: Error: Enum constructors can't contain super-initializers. const E2.named1() : super(); // Error. ^"; enum-element static const field self::E2 two = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:17:23: Error: Enum constructors can't contain super-initializers. const E2.named2() : super(42, \"42\"); // Error. ^"; + static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:16:23: Error: Enum constructors can't contain super-initializers. + const E2.named1() : super(); // Error. + ^"; const constructor named1(core::int #index, core::String #name) → self::E2 : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:16:23: Error: Enum constructors can't contain super-initializers. const E2.named1() : super(); // Error. diff --git a/pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart.strong.outline.expect index 10e27926d27d..a3efb2f9f5ac 100644 --- a/pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart.strong.outline.expect @@ -27,11 +27,11 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E1::element]; enum-element static const field invalid-type element = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:6:3: Error: Cannot invoke a non-'const' constructor where a const expression is expected. Try using a constructor or factory that is 'const'. element; ^"; + static const field core::List values = const [self::E1::element]; constructor •(core::int #index, core::String #name) → self::E1 ; constructor named(core::int #index, core::String #name) → self::E1 @@ -40,9 +40,9 @@ Try using a constructor or factory that is 'const'. return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E2::one, self::E2::two]; enum-element static const field self::E2 one = const self::E2::named1(0, "one"); enum-element static const field self::E2 two = const self::E2::named2(1, "two"); + static const field core::List values = const [self::E2::one, self::E2::two]; const constructor named1(core::int #index, core::String #name) → self::E2 : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:16:23: Error: Enum constructors can't contain super-initializers. const E2.named1() : super(); // Error. diff --git a/pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart.strong.transformed.expect index e9794e205c67..560f8ab3e706 100644 --- a/pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart.strong.transformed.expect @@ -27,11 +27,11 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:6:3: Error: Cannot invoke a non-'const' constructor where a const expression is expected. + enum-element static const field invalid-type element = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:6:3: Error: Cannot invoke a non-'const' constructor where a const expression is expected. Try using a constructor or factory that is 'const'. element; ^"; - enum-element static const field invalid-type element = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:6:3: Error: Cannot invoke a non-'const' constructor where a const expression is expected. + static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:6:3: Error: Cannot invoke a non-'const' constructor where a const expression is expected. Try using a constructor or factory that is 'const'. element; ^"; @@ -45,15 +45,15 @@ Try using a constructor or factory that is 'const'. return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:16:23: Error: Enum constructors can't contain super-initializers. - const E2.named1() : super(); // Error. - ^"; enum-element static const field self::E2 one = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:16:23: Error: Enum constructors can't contain super-initializers. const E2.named1() : super(); // Error. ^"; enum-element static const field self::E2 two = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:17:23: Error: Enum constructors can't contain super-initializers. const E2.named2() : super(42, \"42\"); // Error. ^"; + static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:16:23: Error: Enum constructors can't contain super-initializers. + const E2.named1() : super(); // Error. + ^"; const constructor named1(core::int #index, core::String #name) → self::E2 : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/enhanced_enums/malformed_constructors.dart:16:23: Error: Enum constructors can't contain super-initializers. const E2.named1() : super(); // Error. diff --git a/pkg/front_end/testcases/enhanced_enums/member_values_conflicts.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/member_values_conflicts.dart.strong.expect index 298d5197ae4d..f6a96f399c83 100644 --- a/pkg/front_end/testcases/enhanced_enums/member_values_conflicts.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/member_values_conflicts.dart.strong.expect @@ -10,9 +10,9 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::E e1 = #C3; enum-element static const field self::E e2 = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/member_values_conflicts.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/member_values_conflicts.dart.strong.modular.expect index 298d5197ae4d..f6a96f399c83 100644 --- a/pkg/front_end/testcases/enhanced_enums/member_values_conflicts.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/member_values_conflicts.dart.strong.modular.expect @@ -10,9 +10,9 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::E e1 = #C3; enum-element static const field self::E e2 = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/member_values_conflicts.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/member_values_conflicts.dart.strong.outline.expect index fb9c6b925c01..9a3a739941b5 100644 --- a/pkg/front_end/testcases/enhanced_enums/member_values_conflicts.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/member_values_conflicts.dart.strong.outline.expect @@ -10,9 +10,9 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E::e1, self::E::e2]; enum-element static const field self::E e1 = const self::E::•(0, "e1"); enum-element static const field self::E e2 = const self::E::•(1, "e2"); + static const field core::List values = const [self::E::e1, self::E::e2]; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; @@ -26,7 +26,7 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///member_values_conflicts.dart:5:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "e1"}, const E{_Enum.index: 1, _Enum._name: "e2"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///member_values_conflicts.dart:6:3 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "e1"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///member_values_conflicts.dart:7:3 -> InstanceConstant(const E{_Enum.index: 1, _Enum._name: "e2"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///member_values_conflicts.dart:5:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "e1"}, const E{_Enum.index: 1, _Enum._name: "e2"}]) Extra constant evaluation: evaluated: 8, effectively constant: 3 diff --git a/pkg/front_end/testcases/enhanced_enums/member_values_conflicts.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/member_values_conflicts.dart.strong.transformed.expect index 298d5197ae4d..f6a96f399c83 100644 --- a/pkg/front_end/testcases/enhanced_enums/member_values_conflicts.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/member_values_conflicts.dart.strong.transformed.expect @@ -10,9 +10,9 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::E e1 = #C3; enum-element static const field self::E e2 = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/members.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/members.dart.strong.expect index 9e2198c7c8b1..e3b5661a5a8a 100644 --- a/pkg/front_end/testcases/enhanced_enums/members.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/members.dart.strong.expect @@ -3,12 +3,12 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { + enum-element static const field self::E one = #C5; + enum-element static const field self::E two = #C8; final field core::int foo; final field core::int bar = 42; static field self::E staticFoo = self::E::f(); static const field core::List values = #C9; - enum-element static const field self::E one = #C5; - enum-element static const field self::E two = #C8; const constructor •(core::int #index, core::String #name, core::int foo) → self::E : self::E::foo = foo, super core::_Enum::•(#index, #name) ; @@ -22,12 +22,12 @@ class E extends core::_Enum /*isEnum*/ { return "${d}${b}"; } class E2 extends core::_Enum /*isEnum*/ { + enum-element static const field self::E2 one = #C11; + enum-element static const field self::E2 two = #C13; final field self::E2::X% foo; final field self::E2::X? bar = null; static field () → self::E2 staticFoo = () → self::E2 => self::E2::f(); static const field core::List> values = #C14; - enum-element static const field self::E2 one = #C11; - enum-element static const field self::E2 two = #C13; const constructor •(core::int #index, core::String #name, self::E2::X% foo) → self::E2 : self::E2::foo = foo, super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/members.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/members.dart.strong.modular.expect index 9e2198c7c8b1..e3b5661a5a8a 100644 --- a/pkg/front_end/testcases/enhanced_enums/members.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/members.dart.strong.modular.expect @@ -3,12 +3,12 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { + enum-element static const field self::E one = #C5; + enum-element static const field self::E two = #C8; final field core::int foo; final field core::int bar = 42; static field self::E staticFoo = self::E::f(); static const field core::List values = #C9; - enum-element static const field self::E one = #C5; - enum-element static const field self::E two = #C8; const constructor •(core::int #index, core::String #name, core::int foo) → self::E : self::E::foo = foo, super core::_Enum::•(#index, #name) ; @@ -22,12 +22,12 @@ class E extends core::_Enum /*isEnum*/ { return "${d}${b}"; } class E2 extends core::_Enum /*isEnum*/ { + enum-element static const field self::E2 one = #C11; + enum-element static const field self::E2 two = #C13; final field self::E2::X% foo; final field self::E2::X? bar = null; static field () → self::E2 staticFoo = () → self::E2 => self::E2::f(); static const field core::List> values = #C14; - enum-element static const field self::E2 one = #C11; - enum-element static const field self::E2 two = #C13; const constructor •(core::int #index, core::String #name, self::E2::X% foo) → self::E2 : self::E2::foo = foo, super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/members.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/members.dart.strong.outline.expect index 27a1cbb125d7..3907bae2ea29 100644 --- a/pkg/front_end/testcases/enhanced_enums/members.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/members.dart.strong.outline.expect @@ -3,12 +3,12 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { + enum-element static const field self::E one = const self::E::•(0, "one", 1); + enum-element static const field self::E two = const self::E::•(1, "two", 2); final field core::int foo; final field core::int bar; static field self::E staticFoo; static const field core::List values = const [self::E::one, self::E::two]; - enum-element static const field self::E one = const self::E::•(0, "one", 1); - enum-element static const field self::E two = const self::E::•(1, "two", 2); const constructor •(core::int #index, core::String #name, core::int foo) → self::E : self::E::foo = foo, super core::_Enum::•(#index, #name) ; @@ -22,12 +22,12 @@ class E extends core::_Enum /*isEnum*/ { ; } class E2 extends core::_Enum /*isEnum*/ { + enum-element static const field self::E2 one = const self::E2::•(0, "one", 1); + enum-element static const field self::E2 two = const self::E2::•(1, "two", "2"); final field self::E2::X% foo; final field self::E2::X? bar; static field () → self::E2 staticFoo; static const field core::List> values = const >[self::E2::one, self::E2::two]; - enum-element static const field self::E2 one = const self::E2::•(0, "one", 1); - enum-element static const field self::E2 two = const self::E2::•(1, "two", "2"); const constructor •(core::int #index, core::String #name, self::E2::X% foo) → self::E2 : self::E2::foo = foo, super core::_Enum::•(#index, #name) ; @@ -45,10 +45,10 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///members.dart:5:6 -> ListConstant(const [const E{E.foo: 1, E.bar: null, _Enum.index: 0, _Enum._name: "one"}, const E{E.foo: 2, E.bar: null, _Enum.index: 1, _Enum._name: "two"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///members.dart:6:3 -> InstanceConstant(const E{E.foo: 1, E.bar: null, _Enum.index: 0, _Enum._name: "one"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///members.dart:7:3 -> InstanceConstant(const E{E.foo: 2, E.bar: null, _Enum.index: 1, _Enum._name: "two"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///members.dart:23:6 -> ListConstant(const >[const E2{E2.foo: 1, E2.bar: null, _Enum.index: 0, _Enum._name: "one"}, const E2{E2.foo: "2", E2.bar: null, _Enum.index: 1, _Enum._name: "two"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///members.dart:5:6 -> ListConstant(const [const E{E.foo: 1, E.bar: null, _Enum.index: 0, _Enum._name: "one"}, const E{E.foo: 2, E.bar: null, _Enum.index: 1, _Enum._name: "two"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///members.dart:24:3 -> InstanceConstant(const E2{E2.foo: 1, E2.bar: null, _Enum.index: 0, _Enum._name: "one"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///members.dart:25:3 -> InstanceConstant(const E2{E2.foo: "2", E2.bar: null, _Enum.index: 1, _Enum._name: "two"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///members.dart:23:6 -> ListConstant(const >[const E2{E2.foo: 1, E2.bar: null, _Enum.index: 0, _Enum._name: "one"}, const E2{E2.foo: "2", E2.bar: null, _Enum.index: 1, _Enum._name: "two"}]) Extra constant evaluation: evaluated: 18, effectively constant: 6 diff --git a/pkg/front_end/testcases/enhanced_enums/members.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/members.dart.strong.transformed.expect index 9e2198c7c8b1..e3b5661a5a8a 100644 --- a/pkg/front_end/testcases/enhanced_enums/members.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/members.dart.strong.transformed.expect @@ -3,12 +3,12 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { + enum-element static const field self::E one = #C5; + enum-element static const field self::E two = #C8; final field core::int foo; final field core::int bar = 42; static field self::E staticFoo = self::E::f(); static const field core::List values = #C9; - enum-element static const field self::E one = #C5; - enum-element static const field self::E two = #C8; const constructor •(core::int #index, core::String #name, core::int foo) → self::E : self::E::foo = foo, super core::_Enum::•(#index, #name) ; @@ -22,12 +22,12 @@ class E extends core::_Enum /*isEnum*/ { return "${d}${b}"; } class E2 extends core::_Enum /*isEnum*/ { + enum-element static const field self::E2 one = #C11; + enum-element static const field self::E2 two = #C13; final field self::E2::X% foo; final field self::E2::X? bar = null; static field () → self::E2 staticFoo = () → self::E2 => self::E2::f(); static const field core::List> values = #C14; - enum-element static const field self::E2 one = #C11; - enum-element static const field self::E2 two = #C13; const constructor •(core::int #index, core::String #name, self::E2::X% foo) → self::E2 : self::E2::foo = foo, super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/missed_checks.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/missed_checks.dart.strong.expect index 54187e24f112..0fa55ae2fce5 100644 --- a/pkg/front_end/testcases/enhanced_enums/missed_checks.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/missed_checks.dart.strong.expect @@ -40,8 +40,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E1 element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -49,8 +49,8 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C6; enum-element static const field self::E2 element = #C5; + static const field core::List> values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -58,8 +58,8 @@ class E2 extends core::_Enum /*isEnum*/ return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C8; enum-element static const field self::E3 element = #C7; + static const field core::List> values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -67,8 +67,8 @@ class E3 extends core::_Enum /*isEnum*/ return "E3.${this.{core::_Enum::_name}{core::String}}"; } class values extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::values element = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::values : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/missed_checks.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/missed_checks.dart.strong.modular.expect index 54187e24f112..0fa55ae2fce5 100644 --- a/pkg/front_end/testcases/enhanced_enums/missed_checks.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/missed_checks.dart.strong.modular.expect @@ -40,8 +40,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E1 element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -49,8 +49,8 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C6; enum-element static const field self::E2 element = #C5; + static const field core::List> values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -58,8 +58,8 @@ class E2 extends core::_Enum /*isEnum*/ return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C8; enum-element static const field self::E3 element = #C7; + static const field core::List> values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -67,8 +67,8 @@ class E3 extends core::_Enum /*isEnum*/ return "E3.${this.{core::_Enum::_name}{core::String}}"; } class values extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::values element = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::values : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/missed_checks.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/missed_checks.dart.strong.outline.expect index 2a7d8657fef7..f67e733dd2c5 100644 --- a/pkg/front_end/testcases/enhanced_enums/missed_checks.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/missed_checks.dart.strong.outline.expect @@ -40,8 +40,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E1::element]; enum-element static const field self::E1 element = const self::E1::•(0, "element"); + static const field core::List values = const [self::E1::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -49,8 +49,8 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List> values = const >[self::E2::element]; enum-element static const field self::E2 element = const self::E2::•(0, "element"); + static const field core::List> values = const >[self::E2::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -58,8 +58,8 @@ class E2 extends core::_Enum /*isEnum*/ return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List> values = const >[self::E3::element]; enum-element static const field self::E3 element = const self::E3::•(0, "element"); + static const field core::List> values = const >[self::E3::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -67,8 +67,8 @@ class E3 extends core::_Enum /*isEnum*/ return "E3.${this.{core::_Enum::_name}{core::String}}"; } class values extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::values::element]; enum-element static const field self::values element = const self::values::•(0, "element"); + static const field core::List values = const [self::values::element]; const synthetic constructor •(core::int #index, core::String #name) → self::values : super core::_Enum::•(#index, #name) ; @@ -110,12 +110,12 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///missed_checks.dart:5:6 -> ListConstant(const [const E1{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///missed_checks.dart:6:3 -> InstanceConstant(const E1{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///missed_checks.dart:10:6 -> ListConstant(const >[const E2{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///missed_checks.dart:5:6 -> ListConstant(const [const E1{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///missed_checks.dart:11:3 -> InstanceConstant(const E2{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///missed_checks.dart:14:6 -> ListConstant(const >[const E3{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///missed_checks.dart:10:6 -> ListConstant(const >[const E2{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///missed_checks.dart:15:3 -> InstanceConstant(const E3{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///missed_checks.dart:18:6 -> ListConstant(const [const values{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///missed_checks.dart:14:6 -> ListConstant(const >[const E3{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///missed_checks.dart:19:3 -> InstanceConstant(const values{_Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///missed_checks.dart:18:6 -> ListConstant(const [const values{_Enum.index: 0, _Enum._name: "element"}]) Extra constant evaluation: evaluated: 28, effectively constant: 8 diff --git a/pkg/front_end/testcases/enhanced_enums/missed_checks.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/missed_checks.dart.strong.transformed.expect index 54187e24f112..0fa55ae2fce5 100644 --- a/pkg/front_end/testcases/enhanced_enums/missed_checks.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/missed_checks.dart.strong.transformed.expect @@ -40,8 +40,8 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E1 element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -49,8 +49,8 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C6; enum-element static const field self::E2 element = #C5; + static const field core::List> values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -58,8 +58,8 @@ class E2 extends core::_Enum /*isEnum*/ return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C8; enum-element static const field self::E3 element = #C7; + static const field core::List> values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -67,8 +67,8 @@ class E3 extends core::_Enum /*isEnum*/ return "E3.${this.{core::_Enum::_name}{core::String}}"; } class values extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::values element = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::values : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/named_arguments.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/named_arguments.dart.strong.expect index e1fff4c94b2e..eb5776079f6b 100644 --- a/pkg/front_end/testcases/enhanced_enums/named_arguments.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/named_arguments.dart.strong.expect @@ -3,11 +3,11 @@ import self as self; import "dart:core" as core; class E0 extends core::_Enum /*isEnum*/ { + enum-element static const field self::E0 one = #C4; + enum-element static const field self::E0 two = #C7; final field core::int foo; final field core::int bar; static const field core::List values = #C8; - enum-element static const field self::E0 one = #C4; - enum-element static const field self::E0 two = #C7; const constructor •(core::int #index, core::String #name, core::int foo, {required core::int bar}) → self::E0 : self::E0::foo = foo, self::E0::bar = bar, super core::_Enum::•(#index, #name) ; @@ -15,10 +15,10 @@ class E0 extends core::_Enum /*isEnum*/ { return "E0.${this.{core::_Enum::_name}{core::String}}"; } class E1 extends core::_Enum /*isEnum*/ { - final field self::E1::X% foo; - static const field core::List> values = #C12; enum-element static const field self::E1 one = #C10; enum-element static const field self::E1 two = #C11; + final field self::E1::X% foo; + static const field core::List> values = #C12; const constructor •(core::int #index, core::String #name, {required self::E1::X% foo}) → self::E1 : self::E1::foo = foo, super core::_Enum::•(#index, #name) ; @@ -26,13 +26,13 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { + enum-element static const field self::E2 one = #C14; + enum-element static const field self::E2 two = #C16; + enum-element static const field self::E2 three = #C21; final field self::E2::X% foo; final field self::E2::Y% bar; final field self::E2::Z? baz; static const field core::List> values = #C22; - enum-element static const field self::E2 one = #C14; - enum-element static const field self::E2 two = #C16; - enum-element static const field self::E2 three = #C21; const constructor •(core::int #index, core::String #name, self::E2::X% foo, {required self::E2::Y% bar, has-declared-initializer self::E2::Z? baz = #C19}) → self::E2 : self::E2::foo = foo, self::E2::bar = bar, self::E2::baz = baz, super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/named_arguments.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/named_arguments.dart.strong.modular.expect index e1fff4c94b2e..eb5776079f6b 100644 --- a/pkg/front_end/testcases/enhanced_enums/named_arguments.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/named_arguments.dart.strong.modular.expect @@ -3,11 +3,11 @@ import self as self; import "dart:core" as core; class E0 extends core::_Enum /*isEnum*/ { + enum-element static const field self::E0 one = #C4; + enum-element static const field self::E0 two = #C7; final field core::int foo; final field core::int bar; static const field core::List values = #C8; - enum-element static const field self::E0 one = #C4; - enum-element static const field self::E0 two = #C7; const constructor •(core::int #index, core::String #name, core::int foo, {required core::int bar}) → self::E0 : self::E0::foo = foo, self::E0::bar = bar, super core::_Enum::•(#index, #name) ; @@ -15,10 +15,10 @@ class E0 extends core::_Enum /*isEnum*/ { return "E0.${this.{core::_Enum::_name}{core::String}}"; } class E1 extends core::_Enum /*isEnum*/ { - final field self::E1::X% foo; - static const field core::List> values = #C12; enum-element static const field self::E1 one = #C10; enum-element static const field self::E1 two = #C11; + final field self::E1::X% foo; + static const field core::List> values = #C12; const constructor •(core::int #index, core::String #name, {required self::E1::X% foo}) → self::E1 : self::E1::foo = foo, super core::_Enum::•(#index, #name) ; @@ -26,13 +26,13 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { + enum-element static const field self::E2 one = #C14; + enum-element static const field self::E2 two = #C16; + enum-element static const field self::E2 three = #C21; final field self::E2::X% foo; final field self::E2::Y% bar; final field self::E2::Z? baz; static const field core::List> values = #C22; - enum-element static const field self::E2 one = #C14; - enum-element static const field self::E2 two = #C16; - enum-element static const field self::E2 three = #C21; const constructor •(core::int #index, core::String #name, self::E2::X% foo, {required self::E2::Y% bar, has-declared-initializer self::E2::Z? baz = #C19}) → self::E2 : self::E2::foo = foo, self::E2::bar = bar, self::E2::baz = baz, super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/named_arguments.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/named_arguments.dart.strong.outline.expect index ce37e0d3d969..7f9e1bd9cd92 100644 --- a/pkg/front_end/testcases/enhanced_enums/named_arguments.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/named_arguments.dart.strong.outline.expect @@ -3,11 +3,11 @@ import self as self; import "dart:core" as core; class E0 extends core::_Enum /*isEnum*/ { + enum-element static const field self::E0 one = const self::E0::•(0, "one", 1, bar: 1); + enum-element static const field self::E0 two = const self::E0::•(1, "two", 2, bar: 2); final field core::int foo; final field core::int bar; static const field core::List values = const [self::E0::one, self::E0::two]; - enum-element static const field self::E0 one = const self::E0::•(0, "one", 1, bar: 1); - enum-element static const field self::E0 two = const self::E0::•(1, "two", 2, bar: 2); const constructor •(core::int #index, core::String #name, core::int foo, {required core::int bar}) → self::E0 : self::E0::foo = foo, self::E0::bar = bar, super core::_Enum::•(#index, #name) ; @@ -15,10 +15,10 @@ class E0 extends core::_Enum /*isEnum*/ { return "E0.${this.{core::_Enum::_name}{core::String}}"; } class E1 extends core::_Enum /*isEnum*/ { - final field self::E1::X% foo; - static const field core::List> values = const >[self::E1::one, self::E1::two]; enum-element static const field self::E1 one = const self::E1::•(0, "one", foo: "1"); enum-element static const field self::E1 two = const self::E1::•(1, "two", foo: 2); + final field self::E1::X% foo; + static const field core::List> values = const >[self::E1::one, self::E1::two]; const constructor •(core::int #index, core::String #name, {required self::E1::X% foo}) → self::E1 : self::E1::foo = foo, super core::_Enum::•(#index, #name) ; @@ -26,13 +26,13 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { + enum-element static const field self::E2 one = const self::E2::•(0, "one", 1, bar: "1", baz: 3.14); + enum-element static const field self::E2 two = const self::E2::•(1, "two", "2", baz: 3.14, bar: 2); + enum-element static const field self::E2 three = const self::E2::•(2, "three", 3.0, bar: false); final field self::E2::X% foo; final field self::E2::Y% bar; final field self::E2::Z? baz; static const field core::List> values = const >[self::E2::one, self::E2::two, self::E2::three]; - enum-element static const field self::E2 one = const self::E2::•(0, "one", 1, bar: "1", baz: 3.14); - enum-element static const field self::E2 two = const self::E2::•(1, "two", "2", baz: 3.14, bar: 2); - enum-element static const field self::E2 three = const self::E2::•(2, "three", 3.0, bar: false); const constructor •(core::int #index, core::String #name, self::E2::X% foo, {required self::E2::Y% bar, has-declared-initializer self::E2::Z? baz = null}) → self::E2 : self::E2::foo = foo, self::E2::bar = bar, self::E2::baz = baz, super core::_Enum::•(#index, #name) ; @@ -44,14 +44,14 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///named_arguments.dart:5:6 -> ListConstant(const [const E0{E0.foo: 1, E0.bar: 1, _Enum.index: 0, _Enum._name: "one"}, const E0{E0.foo: 2, E0.bar: 2, _Enum.index: 1, _Enum._name: "two"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///named_arguments.dart:6:3 -> InstanceConstant(const E0{E0.foo: 1, E0.bar: 1, _Enum.index: 0, _Enum._name: "one"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///named_arguments.dart:7:3 -> InstanceConstant(const E0{E0.foo: 2, E0.bar: 2, _Enum.index: 1, _Enum._name: "two"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///named_arguments.dart:15:6 -> ListConstant(const >[const E1{E1.foo: "1", _Enum.index: 0, _Enum._name: "one"}, const E1{E1.foo: 2, _Enum.index: 1, _Enum._name: "two"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///named_arguments.dart:5:6 -> ListConstant(const [const E0{E0.foo: 1, E0.bar: 1, _Enum.index: 0, _Enum._name: "one"}, const E0{E0.foo: 2, E0.bar: 2, _Enum.index: 1, _Enum._name: "two"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///named_arguments.dart:16:3 -> InstanceConstant(const E1{E1.foo: "1", _Enum.index: 0, _Enum._name: "one"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///named_arguments.dart:17:3 -> InstanceConstant(const E1{E1.foo: 2, _Enum.index: 1, _Enum._name: "two"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///named_arguments.dart:24:6 -> ListConstant(const >[const E2{E2.foo: 1, E2.bar: "1", E2.baz: 3.14, _Enum.index: 0, _Enum._name: "one"}, const E2{E2.foo: "2", E2.bar: 2, E2.baz: 3.14, _Enum.index: 1, _Enum._name: "two"}, const E2{E2.foo: 3.0, E2.bar: false, E2.baz: null, _Enum.index: 2, _Enum._name: "three"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///named_arguments.dart:15:6 -> ListConstant(const >[const E1{E1.foo: "1", _Enum.index: 0, _Enum._name: "one"}, const E1{E1.foo: 2, _Enum.index: 1, _Enum._name: "two"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///named_arguments.dart:25:3 -> InstanceConstant(const E2{E2.foo: 1, E2.bar: "1", E2.baz: 3.14, _Enum.index: 0, _Enum._name: "one"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///named_arguments.dart:26:3 -> InstanceConstant(const E2{E2.foo: "2", E2.bar: 2, E2.baz: 3.14, _Enum.index: 1, _Enum._name: "two"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///named_arguments.dart:27:3 -> InstanceConstant(const E2{E2.foo: 3.0, E2.bar: false, E2.baz: null, _Enum.index: 2, _Enum._name: "three"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///named_arguments.dart:24:6 -> ListConstant(const >[const E2{E2.foo: 1, E2.bar: "1", E2.baz: 3.14, _Enum.index: 0, _Enum._name: "one"}, const E2{E2.foo: "2", E2.bar: 2, E2.baz: 3.14, _Enum.index: 1, _Enum._name: "two"}, const E2{E2.foo: 3.0, E2.bar: false, E2.baz: null, _Enum.index: 2, _Enum._name: "three"}]) Extra constant evaluation: evaluated: 31, effectively constant: 10 diff --git a/pkg/front_end/testcases/enhanced_enums/named_arguments.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/named_arguments.dart.strong.transformed.expect index e1fff4c94b2e..eb5776079f6b 100644 --- a/pkg/front_end/testcases/enhanced_enums/named_arguments.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/named_arguments.dart.strong.transformed.expect @@ -3,11 +3,11 @@ import self as self; import "dart:core" as core; class E0 extends core::_Enum /*isEnum*/ { + enum-element static const field self::E0 one = #C4; + enum-element static const field self::E0 two = #C7; final field core::int foo; final field core::int bar; static const field core::List values = #C8; - enum-element static const field self::E0 one = #C4; - enum-element static const field self::E0 two = #C7; const constructor •(core::int #index, core::String #name, core::int foo, {required core::int bar}) → self::E0 : self::E0::foo = foo, self::E0::bar = bar, super core::_Enum::•(#index, #name) ; @@ -15,10 +15,10 @@ class E0 extends core::_Enum /*isEnum*/ { return "E0.${this.{core::_Enum::_name}{core::String}}"; } class E1 extends core::_Enum /*isEnum*/ { - final field self::E1::X% foo; - static const field core::List> values = #C12; enum-element static const field self::E1 one = #C10; enum-element static const field self::E1 two = #C11; + final field self::E1::X% foo; + static const field core::List> values = #C12; const constructor •(core::int #index, core::String #name, {required self::E1::X% foo}) → self::E1 : self::E1::foo = foo, super core::_Enum::•(#index, #name) ; @@ -26,13 +26,13 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { + enum-element static const field self::E2 one = #C14; + enum-element static const field self::E2 two = #C16; + enum-element static const field self::E2 three = #C21; final field self::E2::X% foo; final field self::E2::Y% bar; final field self::E2::Z? baz; static const field core::List> values = #C22; - enum-element static const field self::E2 one = #C14; - enum-element static const field self::E2 two = #C16; - enum-element static const field self::E2 three = #C21; const constructor •(core::int #index, core::String #name, self::E2::X% foo, {required self::E2::Y% bar, has-declared-initializer self::E2::Z? baz = #C19}) → self::E2 : self::E2::foo = foo, self::E2::bar = bar, self::E2::baz = baz, super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/named_arguments_anywhere/redirecting_constructor.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/named_arguments_anywhere/redirecting_constructor.dart.strong.expect index 23f080234528..e429de4281d2 100644 --- a/pkg/front_end/testcases/enhanced_enums/named_arguments_anywhere/redirecting_constructor.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/named_arguments_anywhere/redirecting_constructor.dart.strong.expect @@ -3,14 +3,14 @@ import self as self; import "dart:core" as core; class C extends core::_Enum /*isEnum*/ { - final field core::String log; - static const field core::List values = #C20; enum-element static const field self::C a = #C4; enum-element static const field self::C b = #C7; enum-element static const field self::C c = #C10; enum-element static const field self::C d = #C13; enum-element static const field self::C e = #C16; enum-element static const field self::C f = #C19; + final field core::String log; + static const field core::List values = #C20; const constructor •(core::int #index, core::String #name, core::int x, core::int y, {core::int z = #C21}) → self::C : self::C::log = "x=${x}, y=${y}, z=${z}", super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/named_arguments_anywhere/redirecting_constructor.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/named_arguments_anywhere/redirecting_constructor.dart.strong.modular.expect index 23f080234528..e429de4281d2 100644 --- a/pkg/front_end/testcases/enhanced_enums/named_arguments_anywhere/redirecting_constructor.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/named_arguments_anywhere/redirecting_constructor.dart.strong.modular.expect @@ -3,14 +3,14 @@ import self as self; import "dart:core" as core; class C extends core::_Enum /*isEnum*/ { - final field core::String log; - static const field core::List values = #C20; enum-element static const field self::C a = #C4; enum-element static const field self::C b = #C7; enum-element static const field self::C c = #C10; enum-element static const field self::C d = #C13; enum-element static const field self::C e = #C16; enum-element static const field self::C f = #C19; + final field core::String log; + static const field core::List values = #C20; const constructor •(core::int #index, core::String #name, core::int x, core::int y, {core::int z = #C21}) → self::C : self::C::log = "x=${x}, y=${y}, z=${z}", super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/named_arguments_anywhere/redirecting_constructor.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/named_arguments_anywhere/redirecting_constructor.dart.strong.outline.expect index bda7f8c3518a..2507f08bf57e 100644 --- a/pkg/front_end/testcases/enhanced_enums/named_arguments_anywhere/redirecting_constructor.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/named_arguments_anywhere/redirecting_constructor.dart.strong.outline.expect @@ -3,14 +3,14 @@ import self as self; import "dart:core" as core; class C extends core::_Enum /*isEnum*/ { - final field core::String log; - static const field core::List values = const [self::C::a, self::C::b, self::C::c, self::C::d, self::C::e, self::C::f]; enum-element static const field self::C a = const self::C::•(0, "a", 1, 2, z: 3); enum-element static const field self::C b = const self::C::•(1, "b", 1, 2, z: 3); enum-element static const field self::C c = const self::C::•(2, "c", 1, 2, z: 3); enum-element static const field self::C d = const self::C::named1(3, "d", 1, 2, 3); enum-element static const field self::C e = const self::C::named2(4, "e", 1, 2, 3); enum-element static const field self::C f = const self::C::named3(5, "f", 1, 2, 3); + final field core::String log; + static const field core::List values = const [self::C::a, self::C::b, self::C::c, self::C::d, self::C::e, self::C::f]; const constructor •(core::int #index, core::String #name, core::int x, core::int y, {core::int z = 42}) → self::C : self::C::log = "x=${x}, y=${y}, z=${z}", super core::_Enum::•(#index, #name) ; @@ -33,11 +33,11 @@ static method expect(dynamic expected, dynamic actual) → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///redirecting_constructor.dart:5:6 -> ListConstant(const [const C{C.log: "x=1, y=2, z=3", _Enum.index: 0, _Enum._name: "a"}, const C{C.log: "x=1, y=2, z=3", _Enum.index: 1, _Enum._name: "b"}, const C{C.log: "x=1, y=2, z=3", _Enum.index: 2, _Enum._name: "c"}, const C{C.log: "x=1, y=2, z=3", _Enum.index: 3, _Enum._name: "d"}, const C{C.log: "x=1, y=2, z=3", _Enum.index: 4, _Enum._name: "e"}, const C{C.log: "x=1, y=2, z=3", _Enum.index: 5, _Enum._name: "f"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///redirecting_constructor.dart:6:3 -> InstanceConstant(const C{C.log: "x=1, y=2, z=3", _Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///redirecting_constructor.dart:7:3 -> InstanceConstant(const C{C.log: "x=1, y=2, z=3", _Enum.index: 1, _Enum._name: "b"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///redirecting_constructor.dart:8:3 -> InstanceConstant(const C{C.log: "x=1, y=2, z=3", _Enum.index: 2, _Enum._name: "c"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///redirecting_constructor.dart:9:3 -> InstanceConstant(const C{C.log: "x=1, y=2, z=3", _Enum.index: 3, _Enum._name: "d"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///redirecting_constructor.dart:10:3 -> InstanceConstant(const C{C.log: "x=1, y=2, z=3", _Enum.index: 4, _Enum._name: "e"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///redirecting_constructor.dart:11:3 -> InstanceConstant(const C{C.log: "x=1, y=2, z=3", _Enum.index: 5, _Enum._name: "f"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///redirecting_constructor.dart:5:6 -> ListConstant(const [const C{C.log: "x=1, y=2, z=3", _Enum.index: 0, _Enum._name: "a"}, const C{C.log: "x=1, y=2, z=3", _Enum.index: 1, _Enum._name: "b"}, const C{C.log: "x=1, y=2, z=3", _Enum.index: 2, _Enum._name: "c"}, const C{C.log: "x=1, y=2, z=3", _Enum.index: 3, _Enum._name: "d"}, const C{C.log: "x=1, y=2, z=3", _Enum.index: 4, _Enum._name: "e"}, const C{C.log: "x=1, y=2, z=3", _Enum.index: 5, _Enum._name: "f"}]) Extra constant evaluation: evaluated: 38, effectively constant: 7 diff --git a/pkg/front_end/testcases/enhanced_enums/named_arguments_anywhere/redirecting_constructor.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/named_arguments_anywhere/redirecting_constructor.dart.strong.transformed.expect index 23f080234528..e429de4281d2 100644 --- a/pkg/front_end/testcases/enhanced_enums/named_arguments_anywhere/redirecting_constructor.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/named_arguments_anywhere/redirecting_constructor.dart.strong.transformed.expect @@ -3,14 +3,14 @@ import self as self; import "dart:core" as core; class C extends core::_Enum /*isEnum*/ { - final field core::String log; - static const field core::List values = #C20; enum-element static const field self::C a = #C4; enum-element static const field self::C b = #C7; enum-element static const field self::C c = #C10; enum-element static const field self::C d = #C13; enum-element static const field self::C e = #C16; enum-element static const field self::C f = #C19; + final field core::String log; + static const field core::List values = #C20; const constructor •(core::int #index, core::String #name, core::int x, core::int y, {core::int z = #C21}) → self::C : self::C::log = "x=${x}, y=${y}, z=${z}", super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/qualified_names_with_no_type_arguments.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/qualified_names_with_no_type_arguments.dart.strong.expect index 04cef2930aef..57d34b3bc9f4 100644 --- a/pkg/front_end/testcases/enhanced_enums/qualified_names_with_no_type_arguments.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/qualified_names_with_no_type_arguments.dart.strong.expect @@ -3,8 +3,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E a = #C3; + static const field core::List values = #C4; const constructor b(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/qualified_names_with_no_type_arguments.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/qualified_names_with_no_type_arguments.dart.strong.modular.expect index 04cef2930aef..57d34b3bc9f4 100644 --- a/pkg/front_end/testcases/enhanced_enums/qualified_names_with_no_type_arguments.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/qualified_names_with_no_type_arguments.dart.strong.modular.expect @@ -3,8 +3,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E a = #C3; + static const field core::List values = #C4; const constructor b(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/qualified_names_with_no_type_arguments.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/qualified_names_with_no_type_arguments.dart.strong.outline.expect index 1aa333debaa7..b4c8b76d31ac 100644 --- a/pkg/front_end/testcases/enhanced_enums/qualified_names_with_no_type_arguments.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/qualified_names_with_no_type_arguments.dart.strong.outline.expect @@ -3,8 +3,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E::a]; enum-element static const field self::E a = const self::E::b(0, "a"); + static const field core::List values = const [self::E::a]; const constructor b(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; @@ -16,6 +16,6 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///qualified_names_with_no_type_arguments.dart:5:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///qualified_names_with_no_type_arguments.dart:6:3 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "a"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///qualified_names_with_no_type_arguments.dart:5:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "a"}]) Extra constant evaluation: evaluated: 7, effectively constant: 2 diff --git a/pkg/front_end/testcases/enhanced_enums/qualified_names_with_no_type_arguments.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/qualified_names_with_no_type_arguments.dart.strong.transformed.expect index 04cef2930aef..57d34b3bc9f4 100644 --- a/pkg/front_end/testcases/enhanced_enums/qualified_names_with_no_type_arguments.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/qualified_names_with_no_type_arguments.dart.strong.transformed.expect @@ -3,8 +3,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E a = #C3; + static const field core::List values = #C4; const constructor b(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/recovery_in_elements.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/recovery_in_elements.dart.strong.expect index 55b1e3ebbd7b..2dd6fc2cd479 100644 --- a/pkg/front_end/testcases/enhanced_enums/recovery_in_elements.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/recovery_in_elements.dart.strong.expect @@ -15,8 +15,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/recovery_in_elements.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/recovery_in_elements.dart.strong.modular.expect index 55b1e3ebbd7b..2dd6fc2cd479 100644 --- a/pkg/front_end/testcases/enhanced_enums/recovery_in_elements.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/recovery_in_elements.dart.strong.modular.expect @@ -15,8 +15,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/recovery_in_elements.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/recovery_in_elements.dart.strong.outline.expect index 3b298183f1ea..58f53bd84cbe 100644 --- a/pkg/front_end/testcases/enhanced_enums/recovery_in_elements.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/recovery_in_elements.dart.strong.outline.expect @@ -15,8 +15,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E::element]; enum-element static const field self::E element = const self::E::•(0, "element"); + static const field core::List values = const [self::E::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; @@ -30,6 +30,6 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///recovery_in_elements.dart:5:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///recovery_in_elements.dart:6:3 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///recovery_in_elements.dart:5:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "element"}]) Extra constant evaluation: evaluated: 7, effectively constant: 2 diff --git a/pkg/front_end/testcases/enhanced_enums/recovery_in_elements.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/recovery_in_elements.dart.strong.transformed.expect index 55b1e3ebbd7b..2dd6fc2cd479 100644 --- a/pkg/front_end/testcases/enhanced_enums/recovery_in_elements.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/recovery_in_elements.dart.strong.transformed.expect @@ -15,8 +15,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart.strong.expect index 9143d9cd034c..df359dbf16a6 100644 --- a/pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart.strong.expect @@ -19,10 +19,10 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - final field core::int foo; - static const field core::List values = #C8; enum-element static const field self::E1 one = #C4; enum-element static const field self::E1 two = #C7; + final field core::int foo; + static const field core::List values = #C8; const constructor •(core::int #index, core::String #name, core::int foo) → self::E1 : self::E1::foo = foo, super core::_Enum::•(#index, #name) ; @@ -33,13 +33,13 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - final field core::int foo; - static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart:22:35: Error: Too many positional arguments: 3 allowed, but 4 found. + enum-element static const field self::E2 one = #C9; + enum-element static const field self::E2 two = invalid-expression "pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart:22:35: Error: Too many positional arguments: 3 allowed, but 4 found. Try removing the extra positional arguments. const E2.named(int value) : this(value, value); // Error. ^"; - enum-element static const field self::E2 one = #C9; - enum-element static const field self::E2 two = invalid-expression "pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart:22:35: Error: Too many positional arguments: 3 allowed, but 4 found. + final field core::int foo; + static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart:22:35: Error: Too many positional arguments: 3 allowed, but 4 found. Try removing the extra positional arguments. const E2.named(int value) : this(value, value); // Error. ^"; diff --git a/pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart.strong.modular.expect index 9143d9cd034c..df359dbf16a6 100644 --- a/pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart.strong.modular.expect @@ -19,10 +19,10 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - final field core::int foo; - static const field core::List values = #C8; enum-element static const field self::E1 one = #C4; enum-element static const field self::E1 two = #C7; + final field core::int foo; + static const field core::List values = #C8; const constructor •(core::int #index, core::String #name, core::int foo) → self::E1 : self::E1::foo = foo, super core::_Enum::•(#index, #name) ; @@ -33,13 +33,13 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - final field core::int foo; - static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart:22:35: Error: Too many positional arguments: 3 allowed, but 4 found. + enum-element static const field self::E2 one = #C9; + enum-element static const field self::E2 two = invalid-expression "pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart:22:35: Error: Too many positional arguments: 3 allowed, but 4 found. Try removing the extra positional arguments. const E2.named(int value) : this(value, value); // Error. ^"; - enum-element static const field self::E2 one = #C9; - enum-element static const field self::E2 two = invalid-expression "pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart:22:35: Error: Too many positional arguments: 3 allowed, but 4 found. + final field core::int foo; + static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart:22:35: Error: Too many positional arguments: 3 allowed, but 4 found. Try removing the extra positional arguments. const E2.named(int value) : this(value, value); // Error. ^"; diff --git a/pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart.strong.outline.expect index c10c08c7f33c..00353042308d 100644 --- a/pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart.strong.outline.expect @@ -11,10 +11,10 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - final field core::int foo; - static const field core::List values = const [self::E1::one, self::E1::two]; enum-element static const field self::E1 one = const self::E1::•(0, "one", 1); enum-element static const field self::E1 two = const self::E1::named(1, "two", 2); + final field core::int foo; + static const field core::List values = const [self::E1::one, self::E1::two]; const constructor •(core::int #index, core::String #name, core::int foo) → self::E1 : self::E1::foo = foo, super core::_Enum::•(#index, #name) ; @@ -25,10 +25,10 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - final field core::int foo; - static const field core::List values = const [self::E2::one, self::E2::two]; enum-element static const field self::E2 one = const self::E2::•(0, "one", 1); enum-element static const field self::E2 two = const self::E2::named(1, "two", 2); + final field core::int foo; + static const field core::List values = const [self::E2::one, self::E2::two]; const constructor •(core::int #index, core::String #name, core::int foo) → self::E2 : self::E2::foo = foo, super core::_Enum::•(#index, #name) ; @@ -46,9 +46,9 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///redirecting_initializers.dart:5:6 -> ListConstant(const [const E1{E1.foo: 1, _Enum.index: 0, _Enum._name: "one"}, const E1{E1.foo: 2, _Enum.index: 1, _Enum._name: "two"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///redirecting_initializers.dart:6:3 -> InstanceConstant(const E1{E1.foo: 1, _Enum.index: 0, _Enum._name: "one"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///redirecting_initializers.dart:7:3 -> InstanceConstant(const E1{E1.foo: 2, _Enum.index: 1, _Enum._name: "two"}) -Evaluated: StaticGet @ org-dartlang-testcase:///redirecting_initializers.dart:15:6 -> InstanceConstant(const E2{E2.foo: 1, _Enum.index: 0, _Enum._name: "one"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///redirecting_initializers.dart:5:6 -> ListConstant(const [const E1{E1.foo: 1, _Enum.index: 0, _Enum._name: "one"}, const E1{E1.foo: 2, _Enum.index: 1, _Enum._name: "two"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///redirecting_initializers.dart:16:3 -> InstanceConstant(const E2{E2.foo: 1, _Enum.index: 0, _Enum._name: "one"}) +Evaluated: StaticGet @ org-dartlang-testcase:///redirecting_initializers.dart:15:6 -> InstanceConstant(const E2{E2.foo: 1, _Enum.index: 0, _Enum._name: "one"}) Extra constant evaluation: evaluated: 23, effectively constant: 5 diff --git a/pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart.strong.transformed.expect index 9143d9cd034c..df359dbf16a6 100644 --- a/pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart.strong.transformed.expect @@ -19,10 +19,10 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - final field core::int foo; - static const field core::List values = #C8; enum-element static const field self::E1 one = #C4; enum-element static const field self::E1 two = #C7; + final field core::int foo; + static const field core::List values = #C8; const constructor •(core::int #index, core::String #name, core::int foo) → self::E1 : self::E1::foo = foo, super core::_Enum::•(#index, #name) ; @@ -33,13 +33,13 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - final field core::int foo; - static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart:22:35: Error: Too many positional arguments: 3 allowed, but 4 found. + enum-element static const field self::E2 one = #C9; + enum-element static const field self::E2 two = invalid-expression "pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart:22:35: Error: Too many positional arguments: 3 allowed, but 4 found. Try removing the extra positional arguments. const E2.named(int value) : this(value, value); // Error. ^"; - enum-element static const field self::E2 one = #C9; - enum-element static const field self::E2 two = invalid-expression "pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart:22:35: Error: Too many positional arguments: 3 allowed, but 4 found. + final field core::int foo; + static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/redirecting_initializers.dart:22:35: Error: Too many positional arguments: 3 allowed, but 4 found. Try removing the extra positional arguments. const E2.named(int value) : this(value, value); // Error. ^"; diff --git a/pkg/front_end/testcases/enhanced_enums/redirecting_to_unrelated_factory.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/redirecting_to_unrelated_factory.dart.strong.expect index 4dc58786e46c..c3db6f8b1518 100644 --- a/pkg/front_end/testcases/enhanced_enums/redirecting_to_unrelated_factory.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/redirecting_to_unrelated_factory.dart.strong.expect @@ -12,8 +12,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E element = #C3; + static const field core::List values = #C4; const constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/redirecting_to_unrelated_factory.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/redirecting_to_unrelated_factory.dart.strong.modular.expect index 4dc58786e46c..c3db6f8b1518 100644 --- a/pkg/front_end/testcases/enhanced_enums/redirecting_to_unrelated_factory.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/redirecting_to_unrelated_factory.dart.strong.modular.expect @@ -12,8 +12,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E element = #C3; + static const field core::List values = #C4; const constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/redirecting_to_unrelated_factory.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/redirecting_to_unrelated_factory.dart.strong.outline.expect index 61e899bf9e37..2325d1170cae 100644 --- a/pkg/front_end/testcases/enhanced_enums/redirecting_to_unrelated_factory.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/redirecting_to_unrelated_factory.dart.strong.outline.expect @@ -12,8 +12,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E::element]; enum-element static const field self::E element = const self::E::•(0, "element"); + static const field core::List values = const [self::E::element]; const constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; @@ -34,6 +34,6 @@ class A extends core::Object /*hasConstConstructor*/ { Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///redirecting_to_unrelated_factory.dart:5:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///redirecting_to_unrelated_factory.dart:6:3 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///redirecting_to_unrelated_factory.dart:5:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "element"}]) Extra constant evaluation: evaluated: 7, effectively constant: 2 diff --git a/pkg/front_end/testcases/enhanced_enums/redirecting_to_unrelated_factory.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/redirecting_to_unrelated_factory.dart.strong.transformed.expect index 4dc58786e46c..c3db6f8b1518 100644 --- a/pkg/front_end/testcases/enhanced_enums/redirecting_to_unrelated_factory.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/redirecting_to_unrelated_factory.dart.strong.transformed.expect @@ -12,8 +12,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E element = #C3; + static const field core::List values = #C4; const constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/setter_getter_type_check.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/setter_getter_type_check.dart.strong.expect index 55a5ee190b84..31a14acae37d 100644 --- a/pkg/front_end/testcases/enhanced_enums/setter_getter_type_check.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/setter_getter_type_check.dart.strong.expect @@ -3,9 +3,9 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C7; enum-element static const field self::E element = #C3; enum-element static const field self::E element2 = #C6; + static const field core::List> values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/setter_getter_type_check.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/setter_getter_type_check.dart.strong.modular.expect index 55a5ee190b84..31a14acae37d 100644 --- a/pkg/front_end/testcases/enhanced_enums/setter_getter_type_check.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/setter_getter_type_check.dart.strong.modular.expect @@ -3,9 +3,9 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C7; enum-element static const field self::E element = #C3; enum-element static const field self::E element2 = #C6; + static const field core::List> values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/setter_getter_type_check.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/setter_getter_type_check.dart.strong.outline.expect index 9876f6d0cc75..f0ae21938126 100644 --- a/pkg/front_end/testcases/enhanced_enums/setter_getter_type_check.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/setter_getter_type_check.dart.strong.outline.expect @@ -3,9 +3,9 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List> values = const >[self::E::element, self::E::element2]; enum-element static const field self::E element = const self::E::•(0, "element"); enum-element static const field self::E element2 = const self::E::•(1, "element2"); + static const field core::List> values = const >[self::E::element, self::E::element2]; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; @@ -21,7 +21,7 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///setter_getter_type_check.dart:5:6 -> ListConstant(const >[const E{_Enum.index: 0, _Enum._name: "element"}, const E{_Enum.index: 1, _Enum._name: "element2"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///setter_getter_type_check.dart:6:3 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "element"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///setter_getter_type_check.dart:7:3 -> InstanceConstant(const E{_Enum.index: 1, _Enum._name: "element2"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///setter_getter_type_check.dart:5:6 -> ListConstant(const >[const E{_Enum.index: 0, _Enum._name: "element"}, const E{_Enum.index: 1, _Enum._name: "element2"}]) Extra constant evaluation: evaluated: 8, effectively constant: 3 diff --git a/pkg/front_end/testcases/enhanced_enums/setter_getter_type_check.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/setter_getter_type_check.dart.strong.transformed.expect index 55a5ee190b84..31a14acae37d 100644 --- a/pkg/front_end/testcases/enhanced_enums/setter_getter_type_check.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/setter_getter_type_check.dart.strong.transformed.expect @@ -3,9 +3,9 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C7; enum-element static const field self::E element = #C3; enum-element static const field self::E element2 = #C6; + static const field core::List> values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/simple_fields.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/simple_fields.dart.strong.expect index b7e03ba16fbd..0ba7112cda1d 100644 --- a/pkg/front_end/testcases/enhanced_enums/simple_fields.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/simple_fields.dart.strong.expect @@ -3,10 +3,10 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - final field core::int foo; - static const field core::List values = #C8; enum-element static const field self::E1 one = #C4; enum-element static const field self::E1 two = #C7; + final field core::int foo; + static const field core::List values = #C8; const constructor •(core::int #index, core::String #name, core::int foo) → self::E1 : self::E1::foo = foo, super core::_Enum::•(#index, #name) ; @@ -17,12 +17,12 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - final field self::E2::X% foo; - final field self::E2::Y% bar; - static const field core::List> values = #C13; enum-element static const field self::E2 one = #C9; enum-element static const field self::E2 two = #C10; enum-element static const field self::E2 three = #C12; + final field self::E2::X% foo; + final field self::E2::Y% bar; + static const field core::List> values = #C13; const constructor •(core::int #index, core::String #name, self::E2::X% foo, self::E2::Y% bar) → self::E2 : self::E2::foo = foo, self::E2::bar = bar, super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/simple_fields.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/simple_fields.dart.strong.modular.expect index b7e03ba16fbd..0ba7112cda1d 100644 --- a/pkg/front_end/testcases/enhanced_enums/simple_fields.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/simple_fields.dart.strong.modular.expect @@ -3,10 +3,10 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - final field core::int foo; - static const field core::List values = #C8; enum-element static const field self::E1 one = #C4; enum-element static const field self::E1 two = #C7; + final field core::int foo; + static const field core::List values = #C8; const constructor •(core::int #index, core::String #name, core::int foo) → self::E1 : self::E1::foo = foo, super core::_Enum::•(#index, #name) ; @@ -17,12 +17,12 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - final field self::E2::X% foo; - final field self::E2::Y% bar; - static const field core::List> values = #C13; enum-element static const field self::E2 one = #C9; enum-element static const field self::E2 two = #C10; enum-element static const field self::E2 three = #C12; + final field self::E2::X% foo; + final field self::E2::Y% bar; + static const field core::List> values = #C13; const constructor •(core::int #index, core::String #name, self::E2::X% foo, self::E2::Y% bar) → self::E2 : self::E2::foo = foo, self::E2::bar = bar, super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/simple_fields.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/simple_fields.dart.strong.outline.expect index c1967f095b4a..ad1c0aaa8839 100644 --- a/pkg/front_end/testcases/enhanced_enums/simple_fields.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/simple_fields.dart.strong.outline.expect @@ -3,10 +3,10 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - final field core::int foo; - static const field core::List values = const [self::E1::one, self::E1::two]; enum-element static const field self::E1 one = const self::E1::•(0, "one", 1); enum-element static const field self::E1 two = const self::E1::named(1, "two", 2); + final field core::int foo; + static const field core::List values = const [self::E1::one, self::E1::two]; const constructor •(core::int #index, core::String #name, core::int foo) → self::E1 : self::E1::foo = foo, super core::_Enum::•(#index, #name) ; @@ -17,12 +17,12 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - final field self::E2::X% foo; - final field self::E2::Y% bar; - static const field core::List> values = const >[self::E2::one, self::E2::two, self::E2::three]; enum-element static const field self::E2 one = const self::E2::•(0, "one", 1, "one"); enum-element static const field self::E2 two = const self::E2::named(1, "two", "two", 2); enum-element static const field self::E2 three = const self::E2::named(2, "three", "three", "three"); + final field self::E2::X% foo; + final field self::E2::Y% bar; + static const field core::List> values = const >[self::E2::one, self::E2::two, self::E2::three]; const constructor •(core::int #index, core::String #name, self::E2::X% foo, self::E2::Y% bar) → self::E2 : self::E2::foo = foo, self::E2::bar = bar, super core::_Enum::•(#index, #name) ; @@ -37,11 +37,11 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///simple_fields.dart:5:6 -> ListConstant(const [const E1{E1.foo: 1, _Enum.index: 0, _Enum._name: "one"}, const E1{E1.foo: 2, _Enum.index: 1, _Enum._name: "two"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///simple_fields.dart:6:3 -> InstanceConstant(const E1{E1.foo: 1, _Enum.index: 0, _Enum._name: "one"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///simple_fields.dart:7:3 -> InstanceConstant(const E1{E1.foo: 2, _Enum.index: 1, _Enum._name: "two"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///simple_fields.dart:16:6 -> ListConstant(const >[const E2{E2.foo: 1, E2.bar: "one", _Enum.index: 0, _Enum._name: "one"}, const E2{E2.foo: 2, E2.bar: "two", _Enum.index: 1, _Enum._name: "two"}, const E2{E2.foo: "three", E2.bar: "three", _Enum.index: 2, _Enum._name: "three"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///simple_fields.dart:5:6 -> ListConstant(const [const E1{E1.foo: 1, _Enum.index: 0, _Enum._name: "one"}, const E1{E1.foo: 2, _Enum.index: 1, _Enum._name: "two"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///simple_fields.dart:17:3 -> InstanceConstant(const E2{E2.foo: 1, E2.bar: "one", _Enum.index: 0, _Enum._name: "one"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///simple_fields.dart:18:3 -> InstanceConstant(const E2{E2.foo: 2, E2.bar: "two", _Enum.index: 1, _Enum._name: "two"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///simple_fields.dart:19:3 -> InstanceConstant(const E2{E2.foo: "three", E2.bar: "three", _Enum.index: 2, _Enum._name: "three"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///simple_fields.dart:16:6 -> ListConstant(const >[const E2{E2.foo: 1, E2.bar: "one", _Enum.index: 0, _Enum._name: "one"}, const E2{E2.foo: 2, E2.bar: "two", _Enum.index: 1, _Enum._name: "two"}, const E2{E2.foo: "three", E2.bar: "three", _Enum.index: 2, _Enum._name: "three"}]) Extra constant evaluation: evaluated: 27, effectively constant: 7 diff --git a/pkg/front_end/testcases/enhanced_enums/simple_fields.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/simple_fields.dart.strong.transformed.expect index b7e03ba16fbd..0ba7112cda1d 100644 --- a/pkg/front_end/testcases/enhanced_enums/simple_fields.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/simple_fields.dart.strong.transformed.expect @@ -3,10 +3,10 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - final field core::int foo; - static const field core::List values = #C8; enum-element static const field self::E1 one = #C4; enum-element static const field self::E1 two = #C7; + final field core::int foo; + static const field core::List values = #C8; const constructor •(core::int #index, core::String #name, core::int foo) → self::E1 : self::E1::foo = foo, super core::_Enum::•(#index, #name) ; @@ -17,12 +17,12 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - final field self::E2::X% foo; - final field self::E2::Y% bar; - static const field core::List> values = #C13; enum-element static const field self::E2 one = #C9; enum-element static const field self::E2 two = #C10; enum-element static const field self::E2 three = #C12; + final field self::E2::X% foo; + final field self::E2::Y% bar; + static const field core::List> values = #C13; const constructor •(core::int #index, core::String #name, self::E2::X% foo, self::E2::Y% bar) → self::E2 : self::E2::foo = foo, self::E2::bar = bar, super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart.strong.expect index b77a82c9f014..42cec6ce5303 100644 --- a/pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart.strong.expect @@ -37,9 +37,9 @@ abstract class I extends core::Object { abstract method foo() → void; } class E1 extends core::_Enum implements self::I /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::E1 one = #C3; enum-element static const field self::E1 two = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -48,9 +48,9 @@ class E1 extends core::_Enum implements self::I /*isEnum*/ { method foo() → void {} } class E2 extends core::_Enum implements self::I /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E2 one = #C8; enum-element static const field self::E2 two = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -58,9 +58,9 @@ class E2 extends core::_Enum implements self::I /*isEnum*/ { return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 extends core::_Enum implements self::I /*isEnum*/ { - static const field core::List values = #C13; enum-element static const field self::E3 one = #C11; enum-element static const field self::E3 two = #C12; + static const field core::List values = #C13; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -69,9 +69,9 @@ class E3 extends core::_Enum implements self::I /*isEnum*/ { method foo() → void {} } class E4 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field self::E4 one = #C14; enum-element static const field self::E4 two = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart.strong.modular.expect index b77a82c9f014..42cec6ce5303 100644 --- a/pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart.strong.modular.expect @@ -37,9 +37,9 @@ abstract class I extends core::Object { abstract method foo() → void; } class E1 extends core::_Enum implements self::I /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::E1 one = #C3; enum-element static const field self::E1 two = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -48,9 +48,9 @@ class E1 extends core::_Enum implements self::I /*isEnum*/ { method foo() → void {} } class E2 extends core::_Enum implements self::I /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E2 one = #C8; enum-element static const field self::E2 two = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -58,9 +58,9 @@ class E2 extends core::_Enum implements self::I /*isEnum*/ { return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 extends core::_Enum implements self::I /*isEnum*/ { - static const field core::List values = #C13; enum-element static const field self::E3 one = #C11; enum-element static const field self::E3 two = #C12; + static const field core::List values = #C13; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -69,9 +69,9 @@ class E3 extends core::_Enum implements self::I /*isEnum*/ { method foo() → void {} } class E4 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field self::E4 one = #C14; enum-element static const field self::E4 two = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart.strong.outline.expect index 9b9b366a2e17..86324535ff97 100644 --- a/pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart.strong.outline.expect @@ -30,9 +30,9 @@ abstract class I extends core::Object { abstract method foo() → void; } class E1 extends core::_Enum implements self::I /*isEnum*/ { - static const field core::List values = const [self::E1::one, self::E1::two]; enum-element static const field self::E1 one = const self::E1::•(0, "one"); enum-element static const field self::E1 two = const self::E1::•(1, "two"); + static const field core::List values = const [self::E1::one, self::E1::two]; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -42,9 +42,9 @@ class E1 extends core::_Enum implements self::I /*isEnum*/ { ; } class E2 extends core::_Enum implements self::I /*isEnum*/ { - static const field core::List values = const [self::E2::one, self::E2::two]; enum-element static const field self::E2 one = const self::E2::•(0, "one"); enum-element static const field self::E2 two = const self::E2::•(1, "two"); + static const field core::List values = const [self::E2::one, self::E2::two]; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -52,9 +52,9 @@ class E2 extends core::_Enum implements self::I /*isEnum*/ { return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 extends core::_Enum implements self::I /*isEnum*/ { - static const field core::List values = const [self::E3::one, self::E3::two]; enum-element static const field self::E3 one = const self::E3::•(0, "one"); enum-element static const field self::E3 two = const self::E3::•(1, "two"); + static const field core::List values = const [self::E3::one, self::E3::two]; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -64,9 +64,9 @@ class E3 extends core::_Enum implements self::I /*isEnum*/ { ; } class E4 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E4::one, self::E4::two]; enum-element static const field self::E4 one = const self::E4::•(0, "one"); enum-element static const field self::E4 two = const self::E4::•(1, "two"); + static const field core::List values = const [self::E4::one, self::E4::two]; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super core::_Enum::•(#index, #name) ; @@ -84,16 +84,16 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///simple_interfaces.dart:9:6 -> ListConstant(const [const E1{_Enum.index: 0, _Enum._name: "one"}, const E1{_Enum.index: 1, _Enum._name: "two"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///simple_interfaces.dart:10:3 -> InstanceConstant(const E1{_Enum.index: 0, _Enum._name: "one"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///simple_interfaces.dart:11:3 -> InstanceConstant(const E1{_Enum.index: 1, _Enum._name: "two"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///simple_interfaces.dart:16:6 -> ListConstant(const [const E2{_Enum.index: 0, _Enum._name: "one"}, const E2{_Enum.index: 1, _Enum._name: "two"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///simple_interfaces.dart:9:6 -> ListConstant(const [const E1{_Enum.index: 0, _Enum._name: "one"}, const E1{_Enum.index: 1, _Enum._name: "two"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///simple_interfaces.dart:17:3 -> InstanceConstant(const E2{_Enum.index: 0, _Enum._name: "one"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///simple_interfaces.dart:18:3 -> InstanceConstant(const E2{_Enum.index: 1, _Enum._name: "two"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///simple_interfaces.dart:21:6 -> ListConstant(const [const E3{_Enum.index: 0, _Enum._name: "one"}, const E3{_Enum.index: 1, _Enum._name: "two"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///simple_interfaces.dart:16:6 -> ListConstant(const [const E2{_Enum.index: 0, _Enum._name: "one"}, const E2{_Enum.index: 1, _Enum._name: "two"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///simple_interfaces.dart:22:3 -> InstanceConstant(const E3{_Enum.index: 0, _Enum._name: "one"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///simple_interfaces.dart:23:3 -> InstanceConstant(const E3{_Enum.index: 1, _Enum._name: "two"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///simple_interfaces.dart:28:6 -> ListConstant(const [const E4{_Enum.index: 0, _Enum._name: "one"}, const E4{_Enum.index: 1, _Enum._name: "two"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///simple_interfaces.dart:21:6 -> ListConstant(const [const E3{_Enum.index: 0, _Enum._name: "one"}, const E3{_Enum.index: 1, _Enum._name: "two"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///simple_interfaces.dart:29:3 -> InstanceConstant(const E4{_Enum.index: 0, _Enum._name: "one"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///simple_interfaces.dart:30:3 -> InstanceConstant(const E4{_Enum.index: 1, _Enum._name: "two"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///simple_interfaces.dart:28:6 -> ListConstant(const [const E4{_Enum.index: 0, _Enum._name: "one"}, const E4{_Enum.index: 1, _Enum._name: "two"}]) Extra constant evaluation: evaluated: 32, effectively constant: 12 diff --git a/pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart.strong.transformed.expect index b77a82c9f014..42cec6ce5303 100644 --- a/pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/simple_interfaces.dart.strong.transformed.expect @@ -37,9 +37,9 @@ abstract class I extends core::Object { abstract method foo() → void; } class E1 extends core::_Enum implements self::I /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::E1 one = #C3; enum-element static const field self::E1 two = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -48,9 +48,9 @@ class E1 extends core::_Enum implements self::I /*isEnum*/ { method foo() → void {} } class E2 extends core::_Enum implements self::I /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E2 one = #C8; enum-element static const field self::E2 two = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -58,9 +58,9 @@ class E2 extends core::_Enum implements self::I /*isEnum*/ { return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 extends core::_Enum implements self::I /*isEnum*/ { - static const field core::List values = #C13; enum-element static const field self::E3 one = #C11; enum-element static const field self::E3 two = #C12; + static const field core::List values = #C13; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -69,9 +69,9 @@ class E3 extends core::_Enum implements self::I /*isEnum*/ { method foo() → void {} } class E4 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field self::E4 one = #C14; enum-element static const field self::E4 two = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/simple_mixins.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/simple_mixins.dart.strong.expect index 6b84daabc13f..14efe5f1ffe5 100644 --- a/pkg/front_end/testcases/enhanced_enums/simple_mixins.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/simple_mixins.dart.strong.expect @@ -23,9 +23,9 @@ abstract class _E1&_Enum&M1 = core::_Enum with self::M1 /*isAnonymousMixin,hasCo return super.{self::M1::foo}; } class E1 extends self::_E1&_Enum&M1 /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::E1 one = #C3; enum-element static const field self::E1 two = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super self::_E1&_Enum&M1::•(#index, #name) ; @@ -47,9 +47,9 @@ abstract class _E2&_Enum&M1&M2 = self::_E2&_Enum&M1 with self::M2 /*isAnonymousM return super.{self::M2::bar}(); } class E2 extends self::_E2&_Enum&M1&M2 /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E2 one = #C8; enum-element static const field self::E2 two = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super self::_E2&_Enum&M1&M2::•(#index, #name) ; @@ -64,9 +64,9 @@ abstract class _E3&_Enum&M3 = core::_Enum with self::M3 /*isAnonymousMixin,hasCo return super.{self::M3::callOnAssignment} = f; } class E3 extends self::_E3&_Enum&M3 /*isEnum*/ { - static const field core::List values = #C13; enum-element static const field self::E3 one = #C11; enum-element static const field self::E3 two = #C12; + static const field core::List values = #C13; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super self::_E3&_Enum&M3::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/simple_mixins.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/simple_mixins.dart.strong.modular.expect index 6b84daabc13f..14efe5f1ffe5 100644 --- a/pkg/front_end/testcases/enhanced_enums/simple_mixins.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/simple_mixins.dart.strong.modular.expect @@ -23,9 +23,9 @@ abstract class _E1&_Enum&M1 = core::_Enum with self::M1 /*isAnonymousMixin,hasCo return super.{self::M1::foo}; } class E1 extends self::_E1&_Enum&M1 /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::E1 one = #C3; enum-element static const field self::E1 two = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super self::_E1&_Enum&M1::•(#index, #name) ; @@ -47,9 +47,9 @@ abstract class _E2&_Enum&M1&M2 = self::_E2&_Enum&M1 with self::M2 /*isAnonymousM return super.{self::M2::bar}(); } class E2 extends self::_E2&_Enum&M1&M2 /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E2 one = #C8; enum-element static const field self::E2 two = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super self::_E2&_Enum&M1&M2::•(#index, #name) ; @@ -64,9 +64,9 @@ abstract class _E3&_Enum&M3 = core::_Enum with self::M3 /*isAnonymousMixin,hasCo return super.{self::M3::callOnAssignment} = f; } class E3 extends self::_E3&_Enum&M3 /*isEnum*/ { - static const field core::List values = #C13; enum-element static const field self::E3 one = #C11; enum-element static const field self::E3 two = #C12; + static const field core::List values = #C13; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super self::_E3&_Enum&M3::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/simple_mixins.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/simple_mixins.dart.strong.outline.expect index 285a0750ffcc..39ee178c6f8b 100644 --- a/pkg/front_end/testcases/enhanced_enums/simple_mixins.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/simple_mixins.dart.strong.outline.expect @@ -22,9 +22,9 @@ abstract class _E1&_Enum&M1 = core::_Enum with self::M1 /*isAnonymousMixin,hasCo return super.{self::M1::foo}; } class E1 extends self::_E1&_Enum&M1 /*isEnum*/ { - static const field core::List values = const [self::E1::one, self::E1::two]; enum-element static const field self::E1 one = const self::E1::•(0, "one"); enum-element static const field self::E1 two = const self::E1::•(1, "two"); + static const field core::List values = const [self::E1::one, self::E1::two]; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super self::_E1&_Enum&M1::•(#index, #name) ; @@ -46,9 +46,9 @@ abstract class _E2&_Enum&M1&M2 = self::_E2&_Enum&M1 with self::M2 /*isAnonymousM return super.{self::M2::bar}(); } class E2 extends self::_E2&_Enum&M1&M2 /*isEnum*/ { - static const field core::List values = const [self::E2::one, self::E2::two]; enum-element static const field self::E2 one = const self::E2::•(0, "one"); enum-element static const field self::E2 two = const self::E2::•(1, "two"); + static const field core::List values = const [self::E2::one, self::E2::two]; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super self::_E2&_Enum&M1&M2::•(#index, #name) ; @@ -63,9 +63,9 @@ abstract class _E3&_Enum&M3 = core::_Enum with self::M3 /*isAnonymousMixin,hasCo return super.{self::M3::callOnAssignment} = f; } class E3 extends self::_E3&_Enum&M3 /*isEnum*/ { - static const field core::List values = const [self::E3::one, self::E3::two]; enum-element static const field self::E3 one = const self::E3::•(0, "one"); enum-element static const field self::E3 two = const self::E3::•(1, "two"); + static const field core::List values = const [self::E3::one, self::E3::two]; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super self::_E3&_Enum&M3::•(#index, #name) ; @@ -83,13 +83,13 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///simple_mixins.dart:19:6 -> ListConstant(const [const E1{_Enum.index: 0, _Enum._name: "one"}, const E1{_Enum.index: 1, _Enum._name: "two"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///simple_mixins.dart:19:19 -> InstanceConstant(const E1{_Enum.index: 0, _Enum._name: "one"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///simple_mixins.dart:19:24 -> InstanceConstant(const E1{_Enum.index: 1, _Enum._name: "two"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///simple_mixins.dart:21:6 -> ListConstant(const [const E2{_Enum.index: 0, _Enum._name: "one"}, const E2{_Enum.index: 1, _Enum._name: "two"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///simple_mixins.dart:19:6 -> ListConstant(const [const E1{_Enum.index: 0, _Enum._name: "one"}, const E1{_Enum.index: 1, _Enum._name: "two"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///simple_mixins.dart:21:23 -> InstanceConstant(const E2{_Enum.index: 0, _Enum._name: "one"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///simple_mixins.dart:21:28 -> InstanceConstant(const E2{_Enum.index: 1, _Enum._name: "two"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///simple_mixins.dart:23:6 -> ListConstant(const [const E3{_Enum.index: 0, _Enum._name: "one"}, const E3{_Enum.index: 1, _Enum._name: "two"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///simple_mixins.dart:21:6 -> ListConstant(const [const E2{_Enum.index: 0, _Enum._name: "one"}, const E2{_Enum.index: 1, _Enum._name: "two"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///simple_mixins.dart:23:19 -> InstanceConstant(const E3{_Enum.index: 0, _Enum._name: "one"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///simple_mixins.dart:23:24 -> InstanceConstant(const E3{_Enum.index: 1, _Enum._name: "two"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///simple_mixins.dart:23:6 -> ListConstant(const [const E3{_Enum.index: 0, _Enum._name: "one"}, const E3{_Enum.index: 1, _Enum._name: "two"}]) Extra constant evaluation: evaluated: 37, effectively constant: 9 diff --git a/pkg/front_end/testcases/enhanced_enums/simple_mixins.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/simple_mixins.dart.strong.transformed.expect index 6eed6db85c9f..f99358f5aebb 100644 --- a/pkg/front_end/testcases/enhanced_enums/simple_mixins.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/simple_mixins.dart.strong.transformed.expect @@ -23,9 +23,9 @@ abstract class _E1&_Enum&M1 extends core::_Enum implements self::M1 /*isAnonymou return "foo"; } class E1 extends self::_E1&_Enum&M1 /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::E1 one = #C3; enum-element static const field self::E1 two = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super self::_E1&_Enum&M1::•(#index, #name) ; @@ -47,9 +47,9 @@ abstract class _E2&_Enum&M1&M2 extends self::_E2&_Enum&M1 implements self::M2 /* return 42; } class E2 extends self::_E2&_Enum&M1&M2 /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E2 one = #C8; enum-element static const field self::E2 two = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super self::_E2&_Enum&M1&M2::•(#index, #name) ; @@ -65,9 +65,9 @@ abstract class _E3&_Enum&M3 extends core::_Enum implements self::M3 /*isAnonymou } } class E3 extends self::_E3&_Enum&M3 /*isEnum*/ { - static const field core::List values = #C13; enum-element static const field self::E3 one = #C11; enum-element static const field self::E3 two = #C12; + static const field core::List values = #C13; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super self::_E3&_Enum&M3::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart.strong.expect index 3849d6a7cab7..6a37299cb52f 100644 --- a/pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart.strong.expect @@ -27,11 +27,11 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:6:3: Error: Cannot invoke a non-'const' constructor where a const expression is expected. + enum-element static const field invalid-type element = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:6:3: Error: Cannot invoke a non-'const' constructor where a const expression is expected. Try using a constructor or factory that is 'const'. element; ^"; - enum-element static const field invalid-type element = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:6:3: Error: Cannot invoke a non-'const' constructor where a const expression is expected. + static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:6:3: Error: Cannot invoke a non-'const' constructor where a const expression is expected. Try using a constructor or factory that is 'const'. element; ^"; @@ -45,15 +45,15 @@ Try using a constructor or factory that is 'const'. return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:16:23: Error: Enum constructors can't contain super-initializers. - const E2.named1() : super(); // Error. - ^"; enum-element static const field self::E2 one = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:16:23: Error: Enum constructors can't contain super-initializers. const E2.named1() : super(); // Error. ^"; enum-element static const field self::E2 two = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:17:23: Error: Enum constructors can't contain super-initializers. const E2.named2() : super(42, \"42\"); // Error. ^"; + static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:16:23: Error: Enum constructors can't contain super-initializers. + const E2.named1() : super(); // Error. + ^"; const constructor named1(core::int #index, core::String #name) → self::E2 : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:16:23: Error: Enum constructors can't contain super-initializers. const E2.named1() : super(); // Error. diff --git a/pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart.strong.modular.expect index 3849d6a7cab7..6a37299cb52f 100644 --- a/pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart.strong.modular.expect @@ -27,11 +27,11 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:6:3: Error: Cannot invoke a non-'const' constructor where a const expression is expected. + enum-element static const field invalid-type element = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:6:3: Error: Cannot invoke a non-'const' constructor where a const expression is expected. Try using a constructor or factory that is 'const'. element; ^"; - enum-element static const field invalid-type element = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:6:3: Error: Cannot invoke a non-'const' constructor where a const expression is expected. + static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:6:3: Error: Cannot invoke a non-'const' constructor where a const expression is expected. Try using a constructor or factory that is 'const'. element; ^"; @@ -45,15 +45,15 @@ Try using a constructor or factory that is 'const'. return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:16:23: Error: Enum constructors can't contain super-initializers. - const E2.named1() : super(); // Error. - ^"; enum-element static const field self::E2 one = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:16:23: Error: Enum constructors can't contain super-initializers. const E2.named1() : super(); // Error. ^"; enum-element static const field self::E2 two = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:17:23: Error: Enum constructors can't contain super-initializers. const E2.named2() : super(42, \"42\"); // Error. ^"; + static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:16:23: Error: Enum constructors can't contain super-initializers. + const E2.named1() : super(); // Error. + ^"; const constructor named1(core::int #index, core::String #name) → self::E2 : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:16:23: Error: Enum constructors can't contain super-initializers. const E2.named1() : super(); // Error. diff --git a/pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart.strong.outline.expect index b7cfa18a16b6..fc8fd1ee912b 100644 --- a/pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart.strong.outline.expect @@ -27,11 +27,11 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E1::element]; enum-element static const field invalid-type element = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:6:3: Error: Cannot invoke a non-'const' constructor where a const expression is expected. Try using a constructor or factory that is 'const'. element; ^"; + static const field core::List values = const [self::E1::element]; constructor •(core::int #index, core::String #name) → self::E1 ; constructor named(core::int #index, core::String #name) → self::E1 @@ -40,9 +40,9 @@ Try using a constructor or factory that is 'const'. return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E2::one, self::E2::two]; enum-element static const field self::E2 one = const self::E2::named1(0, "one"); enum-element static const field self::E2 two = const self::E2::named2(1, "two"); + static const field core::List values = const [self::E2::one, self::E2::two]; const constructor named1(core::int #index, core::String #name) → self::E2 : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:16:23: Error: Enum constructors can't contain super-initializers. const E2.named1() : super(); // Error. diff --git a/pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart.strong.transformed.expect index 3849d6a7cab7..6a37299cb52f 100644 --- a/pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart.strong.transformed.expect @@ -27,11 +27,11 @@ import self as self; import "dart:core" as core; class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:6:3: Error: Cannot invoke a non-'const' constructor where a const expression is expected. + enum-element static const field invalid-type element = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:6:3: Error: Cannot invoke a non-'const' constructor where a const expression is expected. Try using a constructor or factory that is 'const'. element; ^"; - enum-element static const field invalid-type element = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:6:3: Error: Cannot invoke a non-'const' constructor where a const expression is expected. + static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:6:3: Error: Cannot invoke a non-'const' constructor where a const expression is expected. Try using a constructor or factory that is 'const'. element; ^"; @@ -45,15 +45,15 @@ Try using a constructor or factory that is 'const'. return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:16:23: Error: Enum constructors can't contain super-initializers. - const E2.named1() : super(); // Error. - ^"; enum-element static const field self::E2 one = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:16:23: Error: Enum constructors can't contain super-initializers. const E2.named1() : super(); // Error. ^"; enum-element static const field self::E2 two = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:17:23: Error: Enum constructors can't contain super-initializers. const E2.named2() : super(42, \"42\"); // Error. ^"; + static const field core::List values = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:16:23: Error: Enum constructors can't contain super-initializers. + const E2.named1() : super(); // Error. + ^"; const constructor named1(core::int #index, core::String #name) → self::E2 : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/enhanced_enums/super_parameters/malformed_constructors.dart:16:23: Error: Enum constructors can't contain super-initializers. const E2.named1() : super(); // Error. diff --git a/pkg/front_end/testcases/enhanced_enums/supertype_resolved_before_checking.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/supertype_resolved_before_checking.dart.strong.expect index 8ec4bc891521..3c81e9d66495 100644 --- a/pkg/front_end/testcases/enhanced_enums/supertype_resolved_before_checking.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/supertype_resolved_before_checking.dart.strong.expect @@ -27,8 +27,8 @@ abstract class _E&_Enum&GM&M = self::_ ; } class E extends self::_E&_Enum&GM&M implements self::I, self::GI /*isEnum*/ { - static const field core::List> values = #C4; enum-element static const field self::E element = #C3; + static const field core::List> values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super self::_E&_Enum&GM&M::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/supertype_resolved_before_checking.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/supertype_resolved_before_checking.dart.strong.modular.expect index 8ec4bc891521..3c81e9d66495 100644 --- a/pkg/front_end/testcases/enhanced_enums/supertype_resolved_before_checking.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/supertype_resolved_before_checking.dart.strong.modular.expect @@ -27,8 +27,8 @@ abstract class _E&_Enum&GM&M = self::_ ; } class E extends self::_E&_Enum&GM&M implements self::I, self::GI /*isEnum*/ { - static const field core::List> values = #C4; enum-element static const field self::E element = #C3; + static const field core::List> values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super self::_E&_Enum&GM&M::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/supertype_resolved_before_checking.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/supertype_resolved_before_checking.dart.strong.outline.expect index b8a557b1b9d1..2af8981d5356 100644 --- a/pkg/front_end/testcases/enhanced_enums/supertype_resolved_before_checking.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/supertype_resolved_before_checking.dart.strong.outline.expect @@ -25,8 +25,8 @@ abstract class _E&_Enum&GM&M = self::_ ; } class E extends self::_E&_Enum&GM&M implements self::I, self::GI /*isEnum*/ { - static const field core::List> values = const >[self::E::element]; enum-element static const field self::E element = const self::E::•(0, "element"); + static const field core::List> values = const >[self::E::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E : super self::_E&_Enum&GM&M::•(#index, #name) ; @@ -38,6 +38,6 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///supertype_resolved_before_checking.dart:16:6 -> ListConstant(const >[const E{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///supertype_resolved_before_checking.dart:18:27 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///supertype_resolved_before_checking.dart:16:6 -> ListConstant(const >[const E{_Enum.index: 0, _Enum._name: "element"}]) Extra constant evaluation: evaluated: 11, effectively constant: 2 diff --git a/pkg/front_end/testcases/enhanced_enums/supertype_resolved_before_checking.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/supertype_resolved_before_checking.dart.strong.transformed.expect index 94c0be6800ad..57e757c17ffc 100644 --- a/pkg/front_end/testcases/enhanced_enums/supertype_resolved_before_checking.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/supertype_resolved_before_checking.dart.strong.transformed.expect @@ -27,8 +27,8 @@ abstract class _E&_Enum&GM&M extends s ; } class E extends self::_E&_Enum&GM&M implements self::I, self::GI /*isEnum*/ { - static const field core::List> values = #C4; enum-element static const field self::E element = #C3; + static const field core::List> values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super self::_E&_Enum&GM&M::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/synthetic_enum_constructor.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/synthetic_enum_constructor.dart.strong.expect index f12e902d410d..40f6f4ea47f8 100644 --- a/pkg/front_end/testcases/enhanced_enums/synthetic_enum_constructor.dart.strong.expect +++ b/pkg/front_end/testcases/enhanced_enums/synthetic_enum_constructor.dart.strong.expect @@ -13,10 +13,10 @@ abstract class _E&_Enum&M = core::_Enum with self::M /*isAnonymousMixin,hasConst return super.{self::M::mixinMethod}(); } class E extends self::_E&_Enum&M /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E e1 = #C3; enum-element static const field self::E e2 = #C6; enum-element static const field self::E e3 = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E : super self::_E&_Enum&M::•(#index, #name) ; @@ -24,10 +24,10 @@ class E extends self::_E&_Enum&M /*isEnum*/ { return "E.${this.{core::_Enum::_name}{core::String}}"; } class F extends core::_Enum /*isEnum*/ { - static const field core::List values = #C17; enum-element static const field self::F f1 = #C12; enum-element static const field self::F f2 = #C14; enum-element static const field self::F f3 = #C16; + static const field core::List values = #C17; const synthetic constructor •(core::int #index, core::String #name) → self::F : super core::_Enum::•(#index, #name) ; @@ -35,10 +35,10 @@ class F extends core::_Enum /*isEnum*/ { return "F.${this.{core::_Enum::_name}{core::String}}"; } class G extends core::_Enum /*isEnum*/ { - static const field core::List values = #C24; enum-element static const field self::G g1 = #C19; enum-element static const field self::G g2 = #C21; enum-element static const field self::G g3 = #C23; + static const field core::List values = #C24; const constructor •(core::int #index, core::String #name) → self::G : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/synthetic_enum_constructor.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/synthetic_enum_constructor.dart.strong.modular.expect index f12e902d410d..40f6f4ea47f8 100644 --- a/pkg/front_end/testcases/enhanced_enums/synthetic_enum_constructor.dart.strong.modular.expect +++ b/pkg/front_end/testcases/enhanced_enums/synthetic_enum_constructor.dart.strong.modular.expect @@ -13,10 +13,10 @@ abstract class _E&_Enum&M = core::_Enum with self::M /*isAnonymousMixin,hasConst return super.{self::M::mixinMethod}(); } class E extends self::_E&_Enum&M /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E e1 = #C3; enum-element static const field self::E e2 = #C6; enum-element static const field self::E e3 = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E : super self::_E&_Enum&M::•(#index, #name) ; @@ -24,10 +24,10 @@ class E extends self::_E&_Enum&M /*isEnum*/ { return "E.${this.{core::_Enum::_name}{core::String}}"; } class F extends core::_Enum /*isEnum*/ { - static const field core::List values = #C17; enum-element static const field self::F f1 = #C12; enum-element static const field self::F f2 = #C14; enum-element static const field self::F f3 = #C16; + static const field core::List values = #C17; const synthetic constructor •(core::int #index, core::String #name) → self::F : super core::_Enum::•(#index, #name) ; @@ -35,10 +35,10 @@ class F extends core::_Enum /*isEnum*/ { return "F.${this.{core::_Enum::_name}{core::String}}"; } class G extends core::_Enum /*isEnum*/ { - static const field core::List values = #C24; enum-element static const field self::G g1 = #C19; enum-element static const field self::G g2 = #C21; enum-element static const field self::G g3 = #C23; + static const field core::List values = #C24; const constructor •(core::int #index, core::String #name) → self::G : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/enhanced_enums/synthetic_enum_constructor.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/synthetic_enum_constructor.dart.strong.outline.expect index a0880554c61e..4fa7c168e13a 100644 --- a/pkg/front_end/testcases/enhanced_enums/synthetic_enum_constructor.dart.strong.outline.expect +++ b/pkg/front_end/testcases/enhanced_enums/synthetic_enum_constructor.dart.strong.outline.expect @@ -14,10 +14,10 @@ abstract class _E&_Enum&M = core::_Enum with self::M /*isAnonymousMixin,hasConst return super.{self::M::mixinMethod}(); } class E extends self::_E&_Enum&M /*isEnum*/ { - static const field core::List values = const [self::E::e1, self::E::e2, self::E::e3]; enum-element static const field self::E e1 = const self::E::•(0, "e1"); enum-element static const field self::E e2 = const self::E::•(1, "e2"); enum-element static const field self::E e3 = const self::E::•(2, "e3"); + static const field core::List values = const [self::E::e1, self::E::e2, self::E::e3]; const synthetic constructor •(core::int #index, core::String #name) → self::E : super self::_E&_Enum&M::•(#index, #name) ; @@ -25,10 +25,10 @@ class E extends self::_E&_Enum&M /*isEnum*/ { return "E.${this.{core::_Enum::_name}{core::String}}"; } class F extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::F::f1, self::F::f2, self::F::f3]; enum-element static const field self::F f1 = const self::F::•(0, "f1"); enum-element static const field self::F f2 = const self::F::•(1, "f2"); enum-element static const field self::F f3 = const self::F::•(2, "f3"); + static const field core::List values = const [self::F::f1, self::F::f2, self::F::f3]; const synthetic constructor •(core::int #index, core::String #name) → self::F : super core::_Enum::•(#index, #name) ; @@ -36,10 +36,10 @@ class F extends core::_Enum /*isEnum*/ { return "F.${this.{core::_Enum::_name}{core::String}}"; } class G extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::G::g1, self::G::g2, self::G::g3]; enum-element static const field self::G g1 = const self::G::•(0, "g1"); enum-element static const field self::G g2 = const self::G::•(1, "g2"); enum-element static const field self::G g3 = const self::G::•(2, "g3"); + static const field core::List values = const [self::G::g1, self::G::g2, self::G::g3]; const constructor •(core::int #index, core::String #name) → self::G : super core::_Enum::•(#index, #name) ; @@ -49,16 +49,16 @@ class G extends core::_Enum /*isEnum*/ { Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///synthetic_enum_constructor.dart:9:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "e1"}, const E{_Enum.index: 1, _Enum._name: "e2"}, const E{_Enum.index: 2, _Enum._name: "e3"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///synthetic_enum_constructor.dart:10:3 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "e1"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///synthetic_enum_constructor.dart:11:3 -> InstanceConstant(const E{_Enum.index: 1, _Enum._name: "e2"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///synthetic_enum_constructor.dart:12:3 -> InstanceConstant(const E{_Enum.index: 2, _Enum._name: "e3"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///synthetic_enum_constructor.dart:15:6 -> ListConstant(const [const F{_Enum.index: 0, _Enum._name: "f1"}, const F{_Enum.index: 1, _Enum._name: "f2"}, const F{_Enum.index: 2, _Enum._name: "f3"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///synthetic_enum_constructor.dart:9:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "e1"}, const E{_Enum.index: 1, _Enum._name: "e2"}, const E{_Enum.index: 2, _Enum._name: "e3"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///synthetic_enum_constructor.dart:16:3 -> InstanceConstant(const F{_Enum.index: 0, _Enum._name: "f1"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///synthetic_enum_constructor.dart:17:3 -> InstanceConstant(const F{_Enum.index: 1, _Enum._name: "f2"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///synthetic_enum_constructor.dart:18:3 -> InstanceConstant(const F{_Enum.index: 2, _Enum._name: "f3"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///synthetic_enum_constructor.dart:21:6 -> ListConstant(const [const G{_Enum.index: 0, _Enum._name: "g1"}, const G{_Enum.index: 1, _Enum._name: "g2"}, const G{_Enum.index: 2, _Enum._name: "g3"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///synthetic_enum_constructor.dart:15:6 -> ListConstant(const [const F{_Enum.index: 0, _Enum._name: "f1"}, const F{_Enum.index: 1, _Enum._name: "f2"}, const F{_Enum.index: 2, _Enum._name: "f3"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///synthetic_enum_constructor.dart:22:3 -> InstanceConstant(const G{_Enum.index: 0, _Enum._name: "g1"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///synthetic_enum_constructor.dart:23:3 -> InstanceConstant(const G{_Enum.index: 1, _Enum._name: "g2"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///synthetic_enum_constructor.dart:24:3 -> InstanceConstant(const G{_Enum.index: 2, _Enum._name: "g3"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///synthetic_enum_constructor.dart:21:6 -> ListConstant(const [const G{_Enum.index: 0, _Enum._name: "g1"}, const G{_Enum.index: 1, _Enum._name: "g2"}, const G{_Enum.index: 2, _Enum._name: "g3"}]) Extra constant evaluation: evaluated: 30, effectively constant: 12 diff --git a/pkg/front_end/testcases/enhanced_enums/synthetic_enum_constructor.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/synthetic_enum_constructor.dart.strong.transformed.expect index d947e4c3d3d8..97375b840749 100644 --- a/pkg/front_end/testcases/enhanced_enums/synthetic_enum_constructor.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/enhanced_enums/synthetic_enum_constructor.dart.strong.transformed.expect @@ -12,10 +12,10 @@ abstract class _E&_Enum&M extends core::_Enum implements self::M /*isAnonymousMi method mixinMethod() → void {} } class E extends self::_E&_Enum&M /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E e1 = #C3; enum-element static const field self::E e2 = #C6; enum-element static const field self::E e3 = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E : super self::_E&_Enum&M::•(#index, #name) ; @@ -23,10 +23,10 @@ class E extends self::_E&_Enum&M /*isEnum*/ { return "E.${this.{core::_Enum::_name}{core::String}}"; } class F extends core::_Enum /*isEnum*/ { - static const field core::List values = #C17; enum-element static const field self::F f1 = #C12; enum-element static const field self::F f2 = #C14; enum-element static const field self::F f3 = #C16; + static const field core::List values = #C17; const synthetic constructor •(core::int #index, core::String #name) → self::F : super core::_Enum::•(#index, #name) ; @@ -34,10 +34,10 @@ class F extends core::_Enum /*isEnum*/ { return "F.${this.{core::_Enum::_name}{core::String}}"; } class G extends core::_Enum /*isEnum*/ { - static const field core::List values = #C24; enum-element static const field self::G g1 = #C19; enum-element static const field self::G g2 = #C21; enum-element static const field self::G g3 = #C23; + static const field core::List values = #C24; const constructor •(core::int #index, core::String #name) → self::G : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/extension_types/issue53840.dart.strong.expect b/pkg/front_end/testcases/extension_types/issue53840.dart.strong.expect index 998d518e349c..85e81ce5ed64 100644 --- a/pkg/front_end/testcases/extension_types/issue53840.dart.strong.expect +++ b/pkg/front_end/testcases/extension_types/issue53840.dart.strong.expect @@ -85,8 +85,8 @@ class A extends core::Object { abstract class M extends self::A /*isMixinDeclaration*/ { } class En extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::En element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::En : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/extension_types/issue53840.dart.strong.modular.expect b/pkg/front_end/testcases/extension_types/issue53840.dart.strong.modular.expect index 998d518e349c..85e81ce5ed64 100644 --- a/pkg/front_end/testcases/extension_types/issue53840.dart.strong.modular.expect +++ b/pkg/front_end/testcases/extension_types/issue53840.dart.strong.modular.expect @@ -85,8 +85,8 @@ class A extends core::Object { abstract class M extends self::A /*isMixinDeclaration*/ { } class En extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::En element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::En : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/extension_types/issue53840.dart.strong.outline.expect b/pkg/front_end/testcases/extension_types/issue53840.dart.strong.outline.expect index 842d75bc2b51..28a26ac6ffbf 100644 --- a/pkg/front_end/testcases/extension_types/issue53840.dart.strong.outline.expect +++ b/pkg/front_end/testcases/extension_types/issue53840.dart.strong.outline.expect @@ -84,8 +84,8 @@ class A extends core::Object { abstract class M extends self::A /*isMixinDeclaration*/ { } class En extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::En::element]; enum-element static const field self::En element = const self::En::•(0, "element"); + static const field core::List values = const [self::En::element]; const synthetic constructor •(core::int #index, core::String #name) → self::En : super core::_Enum::•(#index, #name) ; @@ -266,6 +266,6 @@ static extension-type-member method E19|constructor#_#new#tearOff(self::En en) Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///issue53840.dart:11:6 -> ListConstant(const [const En{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue53840.dart:12:3 -> InstanceConstant(const En{_Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///issue53840.dart:11:6 -> ListConstant(const [const En{_Enum.index: 0, _Enum._name: "element"}]) Extra constant evaluation: evaluated: 45, effectively constant: 2 diff --git a/pkg/front_end/testcases/extension_types/issue53840.dart.strong.transformed.expect b/pkg/front_end/testcases/extension_types/issue53840.dart.strong.transformed.expect index 998d518e349c..85e81ce5ed64 100644 --- a/pkg/front_end/testcases/extension_types/issue53840.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/extension_types/issue53840.dart.strong.transformed.expect @@ -85,8 +85,8 @@ class A extends core::Object { abstract class M extends self::A /*isMixinDeclaration*/ { } class En extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::En element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::En : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/extension_types/issue54097.dart.strong.expect b/pkg/front_end/testcases/extension_types/issue54097.dart.strong.expect index 65ccf6155d66..b7c23141b77d 100644 --- a/pkg/front_end/testcases/extension_types/issue54097.dart.strong.expect +++ b/pkg/front_end/testcases/extension_types/issue54097.dart.strong.expect @@ -127,8 +127,8 @@ class A1% /* erasure=dynamic, declare ; } class Enum1% /* erasure=dynamic, declared=! */> extends core::_Enum /*isEnum*/ { - static const field core::List% /* erasure=dynamic, declared=! */>> values = #C4; enum-element static const field self::Enum1 element = #C3; + static const field core::List% /* erasure=dynamic, declared=! */>> values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::Enum1 : super core::_Enum::•(#index, #name) ; @@ -143,8 +143,8 @@ class A2% /* erasure=dynamic, declare ; } class Enum2% /* erasure=dynamic, declared=! */, Y extends self::Enum2::X% = dynamic> extends core::_Enum /*isEnum*/ { - static const field core::List% /* erasure=dynamic, declared=! */, dynamic>> values = #C6; enum-element static const field self::Enum2 element = #C5; + static const field core::List% /* erasure=dynamic, declared=! */, dynamic>> values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::Enum2 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/extension_types/issue54097.dart.strong.modular.expect b/pkg/front_end/testcases/extension_types/issue54097.dart.strong.modular.expect index 65ccf6155d66..b7c23141b77d 100644 --- a/pkg/front_end/testcases/extension_types/issue54097.dart.strong.modular.expect +++ b/pkg/front_end/testcases/extension_types/issue54097.dart.strong.modular.expect @@ -127,8 +127,8 @@ class A1% /* erasure=dynamic, declare ; } class Enum1% /* erasure=dynamic, declared=! */> extends core::_Enum /*isEnum*/ { - static const field core::List% /* erasure=dynamic, declared=! */>> values = #C4; enum-element static const field self::Enum1 element = #C3; + static const field core::List% /* erasure=dynamic, declared=! */>> values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::Enum1 : super core::_Enum::•(#index, #name) ; @@ -143,8 +143,8 @@ class A2% /* erasure=dynamic, declare ; } class Enum2% /* erasure=dynamic, declared=! */, Y extends self::Enum2::X% = dynamic> extends core::_Enum /*isEnum*/ { - static const field core::List% /* erasure=dynamic, declared=! */, dynamic>> values = #C6; enum-element static const field self::Enum2 element = #C5; + static const field core::List% /* erasure=dynamic, declared=! */, dynamic>> values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::Enum2 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/extension_types/issue54097.dart.strong.outline.expect b/pkg/front_end/testcases/extension_types/issue54097.dart.strong.outline.expect index 531db6df4360..5d4ca17751b3 100644 --- a/pkg/front_end/testcases/extension_types/issue54097.dart.strong.outline.expect +++ b/pkg/front_end/testcases/extension_types/issue54097.dart.strong.outline.expect @@ -106,8 +106,8 @@ class A1% /* erasure=dynamic, declare ; } class Enum1% /* erasure=dynamic, declared=! */> extends core::_Enum /*isEnum*/ { - static const field core::List% /* erasure=dynamic, declared=! */>> values = const >[self::Enum1::element]; enum-element static const field self::Enum1 element = const self::Enum1::•(0, "element"); + static const field core::List% /* erasure=dynamic, declared=! */>> values = const >[self::Enum1::element]; const synthetic constructor •(core::int #index, core::String #name) → self::Enum1 : super core::_Enum::•(#index, #name) ; @@ -121,8 +121,8 @@ class A2% /* erasure=dynamic, declare ; } class Enum2% /* erasure=dynamic, declared=! */, Y extends self::Enum2::X% = dynamic> extends core::_Enum /*isEnum*/ { - static const field core::List% /* erasure=dynamic, declared=! */, dynamic>> values = const >[self::Enum2::element]; enum-element static const field self::Enum2 element = const self::Enum2::•(0, "element"); + static const field core::List% /* erasure=dynamic, declared=! */, dynamic>> values = const >[self::Enum2::element]; const synthetic constructor •(core::int #index, core::String #name) → self::Enum2 : super core::_Enum::•(#index, #name) ; @@ -177,8 +177,8 @@ static method /* from org-dartlang-sdk:///sdk/lib/_internal/vm_shared/lib/intege Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///issue54097.dart:12:6 -> ListConstant(const >>[const Enum1{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue54097.dart:12:31 -> InstanceConstant(const Enum1{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///issue54097.dart:26:6 -> ListConstant(const , >>[const Enum2{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///issue54097.dart:12:6 -> ListConstant(const >>[const Enum1{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue54097.dart:26:44 -> InstanceConstant(const Enum2{_Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///issue54097.dart:26:6 -> ListConstant(const , >>[const Enum2{_Enum.index: 0, _Enum._name: "element"}]) Extra constant evaluation: evaluated: 26, effectively constant: 4 diff --git a/pkg/front_end/testcases/extension_types/issue54097.dart.strong.transformed.expect b/pkg/front_end/testcases/extension_types/issue54097.dart.strong.transformed.expect index 65ccf6155d66..b7c23141b77d 100644 --- a/pkg/front_end/testcases/extension_types/issue54097.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/extension_types/issue54097.dart.strong.transformed.expect @@ -127,8 +127,8 @@ class A1% /* erasure=dynamic, declare ; } class Enum1% /* erasure=dynamic, declared=! */> extends core::_Enum /*isEnum*/ { - static const field core::List% /* erasure=dynamic, declared=! */>> values = #C4; enum-element static const field self::Enum1 element = #C3; + static const field core::List% /* erasure=dynamic, declared=! */>> values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::Enum1 : super core::_Enum::•(#index, #name) ; @@ -143,8 +143,8 @@ class A2% /* erasure=dynamic, declare ; } class Enum2% /* erasure=dynamic, declared=! */, Y extends self::Enum2::X% = dynamic> extends core::_Enum /*isEnum*/ { - static const field core::List% /* erasure=dynamic, declared=! */, dynamic>> values = #C6; enum-element static const field self::Enum2 element = #C5; + static const field core::List% /* erasure=dynamic, declared=! */, dynamic>> values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::Enum2 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/extension_types/redirecting_factory_from_enum.dart.strong.expect b/pkg/front_end/testcases/extension_types/redirecting_factory_from_enum.dart.strong.expect index 0a1545254b42..6e020913e52f 100644 --- a/pkg/front_end/testcases/extension_types/redirecting_factory_from_enum.dart.strong.expect +++ b/pkg/front_end/testcases/extension_types/redirecting_factory_from_enum.dart.strong.expect @@ -26,8 +26,8 @@ class A1 extends core::Object /*hasConstConstructor*/ { ^"; } class A2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::A2 element = #C3; + static const field core::List values = #C4; const constructor •(core::int #index, core::String #name) → self::A2 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/extension_types/redirecting_factory_from_enum.dart.strong.modular.expect b/pkg/front_end/testcases/extension_types/redirecting_factory_from_enum.dart.strong.modular.expect index 0a1545254b42..6e020913e52f 100644 --- a/pkg/front_end/testcases/extension_types/redirecting_factory_from_enum.dart.strong.modular.expect +++ b/pkg/front_end/testcases/extension_types/redirecting_factory_from_enum.dart.strong.modular.expect @@ -26,8 +26,8 @@ class A1 extends core::Object /*hasConstConstructor*/ { ^"; } class A2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::A2 element = #C3; + static const field core::List values = #C4; const constructor •(core::int #index, core::String #name) → self::A2 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/extension_types/redirecting_factory_from_enum.dart.strong.outline.expect b/pkg/front_end/testcases/extension_types/redirecting_factory_from_enum.dart.strong.outline.expect index f207931d5c6c..84d2f3e4fd3a 100644 --- a/pkg/front_end/testcases/extension_types/redirecting_factory_from_enum.dart.strong.outline.expect +++ b/pkg/front_end/testcases/extension_types/redirecting_factory_from_enum.dart.strong.outline.expect @@ -26,8 +26,8 @@ class A1 extends core::Object /*hasConstConstructor*/ { ^"; } class A2 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::A2::element]; enum-element static const field self::A2 element = const self::A2::•(0, "element"); + static const field core::List values = const [self::A2::element]; const constructor •(core::int #index, core::String #name) → self::A2 : super core::_Enum::•(#index, #name) ; @@ -82,6 +82,6 @@ static extension-type-member method E2|constructor#_#named#tearOff(self::A2 it) Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///redirecting_factory_from_enum.dart:14:6 -> ListConstant(const [const A2{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///redirecting_factory_from_enum.dart:15:3 -> InstanceConstant(const A2{_Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///redirecting_factory_from_enum.dart:14:6 -> ListConstant(const [const A2{_Enum.index: 0, _Enum._name: "element"}]) Extra constant evaluation: evaluated: 27, effectively constant: 2 diff --git a/pkg/front_end/testcases/extension_types/redirecting_factory_from_enum.dart.strong.transformed.expect b/pkg/front_end/testcases/extension_types/redirecting_factory_from_enum.dart.strong.transformed.expect index 0a1545254b42..6e020913e52f 100644 --- a/pkg/front_end/testcases/extension_types/redirecting_factory_from_enum.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/extension_types/redirecting_factory_from_enum.dart.strong.transformed.expect @@ -26,8 +26,8 @@ class A1 extends core::Object /*hasConstConstructor*/ { ^"; } class A2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::A2 element = #C3; + static const field core::List values = #C4; const constructor •(core::int #index, core::String #name) → self::A2 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/annotation_on_enum_values.dart.strong.expect b/pkg/front_end/testcases/general/annotation_on_enum_values.dart.strong.expect index ebdf5ca889bd..f393416ccc3b 100644 --- a/pkg/front_end/testcases/general/annotation_on_enum_values.dart.strong.expect +++ b/pkg/front_end/testcases/general/annotation_on_enum_values.dart.strong.expect @@ -9,34 +9,34 @@ class Fisk extends core::Object /*hasConstCon ; } class Foo extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; - @#C11 - enum-element static const field self::Foo bar = #C3; - @#C12 - enum-element static const field self::Foo baz = #C6; - enum-element static const field self::Foo cafebabe = #C9; + @#C1 + enum-element static const field self::Foo bar = #C4; + @#C5 + enum-element static const field self::Foo baz = #C8; + enum-element static const field self::Foo cafebabe = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → self::Foo : super core::_Enum::•(#index, #name) ; method _enumToString() → core::String return "Foo.${this.{core::_Enum::_name}{core::String}}"; } -static const field core::int hest = #C11; +static const field core::int hest = #C1; static method main() → dynamic {} constants { - #C1 = 0 - #C2 = "bar" - #C3 = self::Foo {index:#C1, _name:#C2} - #C4 = 1 - #C5 = "baz" - #C6 = self::Foo {index:#C4, _name:#C5} - #C7 = 2 - #C8 = "cafebabe" - #C9 = self::Foo {index:#C7, _name:#C8} - #C10 = [#C3, #C6, #C9] - #C11 = 42 - #C12 = self::Fisk {x:#C11} + #C1 = 42 + #C2 = 0 + #C3 = "bar" + #C4 = self::Foo {index:#C2, _name:#C3} + #C5 = self::Fisk {x:#C1} + #C6 = 1 + #C7 = "baz" + #C8 = self::Foo {index:#C6, _name:#C7} + #C9 = 2 + #C10 = "cafebabe" + #C11 = self::Foo {index:#C9, _name:#C10} + #C12 = [#C4, #C8, #C11] } diff --git a/pkg/front_end/testcases/general/annotation_on_enum_values.dart.strong.modular.expect b/pkg/front_end/testcases/general/annotation_on_enum_values.dart.strong.modular.expect index ebdf5ca889bd..f393416ccc3b 100644 --- a/pkg/front_end/testcases/general/annotation_on_enum_values.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/annotation_on_enum_values.dart.strong.modular.expect @@ -9,34 +9,34 @@ class Fisk extends core::Object /*hasConstCon ; } class Foo extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; - @#C11 - enum-element static const field self::Foo bar = #C3; - @#C12 - enum-element static const field self::Foo baz = #C6; - enum-element static const field self::Foo cafebabe = #C9; + @#C1 + enum-element static const field self::Foo bar = #C4; + @#C5 + enum-element static const field self::Foo baz = #C8; + enum-element static const field self::Foo cafebabe = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → self::Foo : super core::_Enum::•(#index, #name) ; method _enumToString() → core::String return "Foo.${this.{core::_Enum::_name}{core::String}}"; } -static const field core::int hest = #C11; +static const field core::int hest = #C1; static method main() → dynamic {} constants { - #C1 = 0 - #C2 = "bar" - #C3 = self::Foo {index:#C1, _name:#C2} - #C4 = 1 - #C5 = "baz" - #C6 = self::Foo {index:#C4, _name:#C5} - #C7 = 2 - #C8 = "cafebabe" - #C9 = self::Foo {index:#C7, _name:#C8} - #C10 = [#C3, #C6, #C9] - #C11 = 42 - #C12 = self::Fisk {x:#C11} + #C1 = 42 + #C2 = 0 + #C3 = "bar" + #C4 = self::Foo {index:#C2, _name:#C3} + #C5 = self::Fisk {x:#C1} + #C6 = 1 + #C7 = "baz" + #C8 = self::Foo {index:#C6, _name:#C7} + #C9 = 2 + #C10 = "cafebabe" + #C11 = self::Foo {index:#C9, _name:#C10} + #C12 = [#C4, #C8, #C11] } diff --git a/pkg/front_end/testcases/general/annotation_on_enum_values.dart.strong.outline.expect b/pkg/front_end/testcases/general/annotation_on_enum_values.dart.strong.outline.expect index 8b7161c35581..08225240f2d2 100644 --- a/pkg/front_end/testcases/general/annotation_on_enum_values.dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/annotation_on_enum_values.dart.strong.outline.expect @@ -9,12 +9,12 @@ class Fisk extends core::Object /*hasConstCon ; } class Foo extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::Foo::bar, self::Foo::baz, self::Foo::cafebabe]; @self::hest enum-element static const field self::Foo bar = const self::Foo::•(0, "bar"); @self::Fisk::fisk(self::hest) enum-element static const field self::Foo baz = const self::Foo::•(1, "baz"); enum-element static const field self::Foo cafebabe = const self::Foo::•(2, "cafebabe"); + static const field core::List values = const [self::Foo::bar, self::Foo::baz, self::Foo::cafebabe]; const synthetic constructor •(core::int #index, core::String #name) → self::Foo : super core::_Enum::•(#index, #name) ; @@ -27,10 +27,10 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///annotation_on_enum_values.dart:15:6 -> ListConstant(const [const Foo{_Enum.index: 0, _Enum._name: "bar"}, const Foo{_Enum.index: 1, _Enum._name: "baz"}, const Foo{_Enum.index: 2, _Enum._name: "cafebabe"}]) Evaluated: StaticGet @ org-dartlang-testcase:///annotation_on_enum_values.dart:16:4 -> IntConstant(42) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///annotation_on_enum_values.dart:17:3 -> InstanceConstant(const Foo{_Enum.index: 0, _Enum._name: "bar"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///annotation_on_enum_values.dart:18:4 -> InstanceConstant(const Fisk{Fisk.x: 42}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///annotation_on_enum_values.dart:19:3 -> InstanceConstant(const Foo{_Enum.index: 1, _Enum._name: "baz"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///annotation_on_enum_values.dart:20:3 -> InstanceConstant(const Foo{_Enum.index: 2, _Enum._name: "cafebabe"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///annotation_on_enum_values.dart:15:6 -> ListConstant(const [const Foo{_Enum.index: 0, _Enum._name: "bar"}, const Foo{_Enum.index: 1, _Enum._name: "baz"}, const Foo{_Enum.index: 2, _Enum._name: "cafebabe"}]) Extra constant evaluation: evaluated: 12, effectively constant: 6 diff --git a/pkg/front_end/testcases/general/annotation_on_enum_values.dart.strong.transformed.expect b/pkg/front_end/testcases/general/annotation_on_enum_values.dart.strong.transformed.expect index ebdf5ca889bd..f393416ccc3b 100644 --- a/pkg/front_end/testcases/general/annotation_on_enum_values.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/annotation_on_enum_values.dart.strong.transformed.expect @@ -9,34 +9,34 @@ class Fisk extends core::Object /*hasConstCon ; } class Foo extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; - @#C11 - enum-element static const field self::Foo bar = #C3; - @#C12 - enum-element static const field self::Foo baz = #C6; - enum-element static const field self::Foo cafebabe = #C9; + @#C1 + enum-element static const field self::Foo bar = #C4; + @#C5 + enum-element static const field self::Foo baz = #C8; + enum-element static const field self::Foo cafebabe = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → self::Foo : super core::_Enum::•(#index, #name) ; method _enumToString() → core::String return "Foo.${this.{core::_Enum::_name}{core::String}}"; } -static const field core::int hest = #C11; +static const field core::int hest = #C1; static method main() → dynamic {} constants { - #C1 = 0 - #C2 = "bar" - #C3 = self::Foo {index:#C1, _name:#C2} - #C4 = 1 - #C5 = "baz" - #C6 = self::Foo {index:#C4, _name:#C5} - #C7 = 2 - #C8 = "cafebabe" - #C9 = self::Foo {index:#C7, _name:#C8} - #C10 = [#C3, #C6, #C9] - #C11 = 42 - #C12 = self::Fisk {x:#C11} + #C1 = 42 + #C2 = 0 + #C3 = "bar" + #C4 = self::Foo {index:#C2, _name:#C3} + #C5 = self::Fisk {x:#C1} + #C6 = 1 + #C7 = "baz" + #C8 = self::Foo {index:#C6, _name:#C7} + #C9 = 2 + #C10 = "cafebabe" + #C11 = self::Foo {index:#C9, _name:#C10} + #C12 = [#C4, #C8, #C11] } diff --git a/pkg/front_end/testcases/general/bounds_enums.dart.strong.expect b/pkg/front_end/testcases/general/bounds_enums.dart.strong.expect index c1b43e34e0a6..fb0362609fda 100644 --- a/pkg/front_end/testcases/general/bounds_enums.dart.strong.expect +++ b/pkg/front_end/testcases/general/bounds_enums.dart.strong.expect @@ -24,8 +24,8 @@ class B extends core::Object { ; } class E1 extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C4; enum-element static const field self::E1 e1 = #C3; + static const field core::List> values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -33,8 +33,8 @@ class E1 extend return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 = self::B> extends core::_Enum /*isEnum*/ { - static const field core::List>> values = #C7; enum-element static const field self::E2 e2 = #C6; + static const field core::List>> values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -42,8 +42,8 @@ class E2 = self::B> extends core::_Enum return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 = self::E3> extends core::_Enum /*isEnum*/ { - static const field core::List>> values = #C10; enum-element static const field self::E3 e3 = #C9; + static const field core::List>> values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/bounds_enums.dart.strong.modular.expect b/pkg/front_end/testcases/general/bounds_enums.dart.strong.modular.expect index c1b43e34e0a6..fb0362609fda 100644 --- a/pkg/front_end/testcases/general/bounds_enums.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/bounds_enums.dart.strong.modular.expect @@ -24,8 +24,8 @@ class B extends core::Object { ; } class E1 extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C4; enum-element static const field self::E1 e1 = #C3; + static const field core::List> values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -33,8 +33,8 @@ class E1 extend return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 = self::B> extends core::_Enum /*isEnum*/ { - static const field core::List>> values = #C7; enum-element static const field self::E2 e2 = #C6; + static const field core::List>> values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -42,8 +42,8 @@ class E2 = self::B> extends core::_Enum return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 = self::E3> extends core::_Enum /*isEnum*/ { - static const field core::List>> values = #C10; enum-element static const field self::E3 e3 = #C9; + static const field core::List>> values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/bounds_enums.dart.strong.outline.expect b/pkg/front_end/testcases/general/bounds_enums.dart.strong.outline.expect index d3e71ea31284..eb060ed02222 100644 --- a/pkg/front_end/testcases/general/bounds_enums.dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/bounds_enums.dart.strong.outline.expect @@ -23,8 +23,8 @@ class B extends core::Object { ; } class E1 extends core::_Enum /*isEnum*/ { - static const field core::List> values = const >[self::E1::e1]; enum-element static const field self::E1 e1 = const self::E1::•(0, "e1"); + static const field core::List> values = const >[self::E1::e1]; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -32,8 +32,8 @@ class E1 extend return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 = self::B> extends core::_Enum /*isEnum*/ { - static const field core::List>> values = const >>[self::E2::e2]; enum-element static const field self::E2 e2 = const self::E2::•(0, "e2"); + static const field core::List>> values = const >>[self::E2::e2]; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -41,8 +41,8 @@ class E2 = self::B> extends core::_Enum return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 = self::E3> extends core::_Enum /*isEnum*/ { - static const field core::List>> values = const >>[self::E3::e3]; enum-element static const field self::E3 e3 = const self::E3::•(0, "e3"); + static const field core::List>> values = const >>[self::E3::e3]; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -54,10 +54,10 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_enums.dart:11:6 -> ListConstant(const >[const E1{_Enum.index: 0, _Enum._name: "e1"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_enums.dart:12:3 -> InstanceConstant(const E1{_Enum.index: 0, _Enum._name: "e1"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_enums.dart:15:6 -> ListConstant(const >>[const E2{_Enum.index: 0, _Enum._name: "e2"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_enums.dart:11:6 -> ListConstant(const >[const E1{_Enum.index: 0, _Enum._name: "e1"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_enums.dart:16:3 -> InstanceConstant(const E2{_Enum.index: 0, _Enum._name: "e2"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_enums.dart:19:6 -> ListConstant(const >>[const E3{_Enum.index: 0, _Enum._name: "e3"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_enums.dart:15:6 -> ListConstant(const >>[const E2{_Enum.index: 0, _Enum._name: "e2"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_enums.dart:20:3 -> InstanceConstant(const E3{_Enum.index: 0, _Enum._name: "e3"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_enums.dart:19:6 -> ListConstant(const >>[const E3{_Enum.index: 0, _Enum._name: "e3"}]) Extra constant evaluation: evaluated: 21, effectively constant: 6 diff --git a/pkg/front_end/testcases/general/bounds_enums.dart.strong.transformed.expect b/pkg/front_end/testcases/general/bounds_enums.dart.strong.transformed.expect index c1b43e34e0a6..fb0362609fda 100644 --- a/pkg/front_end/testcases/general/bounds_enums.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/bounds_enums.dart.strong.transformed.expect @@ -24,8 +24,8 @@ class B extends core::Object { ; } class E1 extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C4; enum-element static const field self::E1 e1 = #C3; + static const field core::List> values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -33,8 +33,8 @@ class E1 extend return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 = self::B> extends core::_Enum /*isEnum*/ { - static const field core::List>> values = #C7; enum-element static const field self::E2 e2 = #C6; + static const field core::List>> values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -42,8 +42,8 @@ class E2 = self::B> extends core::_Enum return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 = self::E3> extends core::_Enum /*isEnum*/ { - static const field core::List>> values = #C10; enum-element static const field self::E3 e3 = #C9; + static const field core::List>> values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/bounds_supertypes.dart.strong.expect b/pkg/front_end/testcases/general/bounds_supertypes.dart.strong.expect index 0100b3732f32..93ee82f373da 100644 --- a/pkg/front_end/testcases/general/bounds_supertypes.dart.strong.expect +++ b/pkg/front_end/testcases/general/bounds_supertypes.dart.strong.expect @@ -1040,8 +1040,8 @@ class WithS8 extends self::_WithS8&Object&G { ; } class EnumImplementsT1 extends core::_Enum implements self::Class> /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::EnumImplementsT1 a = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT1 : super core::_Enum::•(#index, #name) ; @@ -1049,8 +1049,8 @@ class EnumImplementsT1 extends core::_Enum implements self::Class /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::EnumImplementsT2 a = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT2 : super core::_Enum::•(#index, #name) ; @@ -1058,8 +1058,8 @@ class EnumImplementsT2 extends core::_Enum implements self::Class /*isE return "EnumImplementsT2.${this.{core::_Enum::_name}{core::String}}"; } class EnumImplementsT3 extends core::_Enum implements self::Class> /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::EnumImplementsT3 a = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT3 : super core::_Enum::•(#index, #name) ; @@ -1067,8 +1067,8 @@ class EnumImplementsT3 extends core::_Enum implements self::Class> /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::EnumImplementsT4 a = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT4 : super core::_Enum::•(#index, #name) ; @@ -1076,8 +1076,8 @@ class EnumImplementsT4 extends core::_Enum implements self::Class /*isEnum*/ { - static const field core::List values = #C12; enum-element static const field self::EnumImplementsT5 a = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT5 : super core::_Enum::•(#index, #name) ; @@ -1085,8 +1085,8 @@ class EnumImplementsT5 extends core::_Enum implements self::Class> /*isEnum*/ { - static const field core::List values = #C14; enum-element static const field self::EnumImplementsT6 a = #C13; + static const field core::List values = #C14; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT6 : super core::_Enum::•(#index, #name) ; @@ -1094,8 +1094,8 @@ class EnumImplementsT6 extends core::_Enum implements self::Class /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field self::EnumImplementsT7 a = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT7 : super core::_Enum::•(#index, #name) ; @@ -1103,8 +1103,8 @@ class EnumImplementsT7 extends core::_Enum implements self::Class return "EnumImplementsT7.${this.{core::_Enum::_name}{core::String}}"; } class EnumImplementsT8 extends core::_Enum implements self::Class /*isEnum*/ { - static const field core::List values = #C18; enum-element static const field self::EnumImplementsT8 a = #C17; + static const field core::List values = #C18; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT8 : super core::_Enum::•(#index, #name) ; @@ -1112,8 +1112,8 @@ class EnumImplementsT8 extends core::_Enum implements self::Class /*i return "EnumImplementsT8.${this.{core::_Enum::_name}{core::String}}"; } class EnumImplementsS1 extends core::_Enum implements self::G> /*isEnum*/ { - static const field core::List values = #C20; enum-element static const field self::EnumImplementsS1 a = #C19; + static const field core::List values = #C20; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS1 : super core::_Enum::•(#index, #name) ; @@ -1121,8 +1121,8 @@ class EnumImplementsS1 extends core::_Enum implements self::G /*isEnum*/ { - static const field core::List values = #C22; enum-element static const field self::EnumImplementsS2 a = #C21; + static const field core::List values = #C22; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS2 : super core::_Enum::•(#index, #name) ; @@ -1130,8 +1130,8 @@ class EnumImplementsS2 extends core::_Enum implements self::G /*isEnum* return "EnumImplementsS2.${this.{core::_Enum::_name}{core::String}}"; } class EnumImplementsS3 extends core::_Enum implements self::G> /*isEnum*/ { - static const field core::List values = #C24; enum-element static const field self::EnumImplementsS3 a = #C23; + static const field core::List values = #C24; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS3 : super core::_Enum::•(#index, #name) ; @@ -1139,8 +1139,8 @@ class EnumImplementsS3 extends core::_Enum implements self::G> /*isEnum*/ { - static const field core::List values = #C26; enum-element static const field self::EnumImplementsS4 a = #C25; + static const field core::List values = #C26; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS4 : super core::_Enum::•(#index, #name) ; @@ -1148,8 +1148,8 @@ class EnumImplementsS4 extends core::_Enum implements self::G /*isEnum*/ { - static const field core::List values = #C28; enum-element static const field self::EnumImplementsS5 a = #C27; + static const field core::List values = #C28; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS5 : super core::_Enum::•(#index, #name) ; @@ -1157,8 +1157,8 @@ class EnumImplementsS5 extends core::_Enum implements self::G> /*isEnum*/ { - static const field core::List values = #C30; enum-element static const field self::EnumImplementsS6 a = #C29; + static const field core::List values = #C30; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS6 : super core::_Enum::•(#index, #name) ; @@ -1166,8 +1166,8 @@ class EnumImplementsS6 extends core::_Enum implements self::G /*isEnum*/ { - static const field core::List values = #C32; enum-element static const field self::EnumImplementsS7 a = #C31; + static const field core::List values = #C32; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS7 : super core::_Enum::•(#index, #name) ; @@ -1175,8 +1175,8 @@ class EnumImplementsS7 extends core::_Enum implements self::G /*is return "EnumImplementsS7.${this.{core::_Enum::_name}{core::String}}"; } class EnumImplementsS8 extends core::_Enum implements self::G /*isEnum*/ { - static const field core::List values = #C34; enum-element static const field self::EnumImplementsS8 a = #C33; + static const field core::List values = #C34; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS8 : super core::_Enum::•(#index, #name) ; @@ -1189,8 +1189,8 @@ abstract class _EnumWithT1&_Enum&F = core::_Enum with self::Class values = #C36; enum-element static const field self::EnumWithT1 a = #C35; + static const field core::List values = #C36; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT1 : super self::_EnumWithT1&_Enum&F::•(#index, #name) ; @@ -1203,8 +1203,8 @@ abstract class _EnumWithT2&_Enum&F = core::_Enum with self::Class /*isA ; } class EnumWithT2 extends self::_EnumWithT2&_Enum&F /*isEnum*/ { - static const field core::List values = #C38; enum-element static const field self::EnumWithT2 a = #C37; + static const field core::List values = #C38; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT2 : super self::_EnumWithT2&_Enum&F::•(#index, #name) ; @@ -1217,8 +1217,8 @@ abstract class _EnumWithT3&_Enum&F = core::_Enum with self::Class values = #C40; enum-element static const field self::EnumWithT3 a = #C39; + static const field core::List values = #C40; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT3 : super self::_EnumWithT3&_Enum&F::•(#index, #name) ; @@ -1231,8 +1231,8 @@ abstract class _EnumWithT4&_Enum&F = core::_Enum with self::Class values = #C42; enum-element static const field self::EnumWithT4 a = #C41; + static const field core::List values = #C42; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT4 : super self::_EnumWithT4&_Enum&F::•(#index, #name) ; @@ -1245,8 +1245,8 @@ abstract class _EnumWithT5&_Enum&F = core::_Enum with self::Class values = #C44; enum-element static const field self::EnumWithT5 a = #C43; + static const field core::List values = #C44; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT5 : super self::_EnumWithT5&_Enum&F::•(#index, #name) ; @@ -1259,8 +1259,8 @@ abstract class _EnumWithT6&_Enum&F = core::_Enum with self::Class values = #C46; enum-element static const field self::EnumWithT6 a = #C45; + static const field core::List values = #C46; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT6 : super self::_EnumWithT6&_Enum&F::•(#index, #name) ; @@ -1273,8 +1273,8 @@ abstract class _EnumWithT7&_Enum&F = core::_Enum with self::Class ; } class EnumWithT7 extends self::_EnumWithT7&_Enum&F /*isEnum*/ { - static const field core::List values = #C48; enum-element static const field self::EnumWithT7 a = #C47; + static const field core::List values = #C48; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT7 : super self::_EnumWithT7&_Enum&F::•(#index, #name) ; @@ -1287,8 +1287,8 @@ abstract class _EnumWithT8&_Enum&F = core::_Enum with self::Class /*i ; } class EnumWithT8 extends self::_EnumWithT8&_Enum&F /*isEnum*/ { - static const field core::List values = #C50; enum-element static const field self::EnumWithT8 a = #C49; + static const field core::List values = #C50; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT8 : super self::_EnumWithT8&_Enum&F::•(#index, #name) ; @@ -1301,8 +1301,8 @@ abstract class _EnumWithS1&_Enum&G = core::_Enum with self::G values = #C52; enum-element static const field self::EnumWithS1 a = #C51; + static const field core::List values = #C52; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS1 : super self::_EnumWithS1&_Enum&G::•(#index, #name) ; @@ -1315,8 +1315,8 @@ abstract class _EnumWithS2&_Enum&G = core::_Enum with self::G /*isAnony ; } class EnumWithS2 extends self::_EnumWithS2&_Enum&G /*isEnum*/ { - static const field core::List values = #C54; enum-element static const field self::EnumWithS2 a = #C53; + static const field core::List values = #C54; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS2 : super self::_EnumWithS2&_Enum&G::•(#index, #name) ; @@ -1329,8 +1329,8 @@ abstract class _EnumWithS3&_Enum&G = core::_Enum with self::G values = #C56; enum-element static const field self::EnumWithS3 a = #C55; + static const field core::List values = #C56; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS3 : super self::_EnumWithS3&_Enum&G::•(#index, #name) ; @@ -1343,8 +1343,8 @@ abstract class _EnumWithS4&_Enum&G = core::_Enum with self::G values = #C58; enum-element static const field self::EnumWithS4 a = #C57; + static const field core::List values = #C58; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS4 : super self::_EnumWithS4&_Enum&G::•(#index, #name) ; @@ -1357,8 +1357,8 @@ abstract class _EnumWithS5&_Enum&G = core::_Enum with self::G values = #C60; enum-element static const field self::EnumWithS5 a = #C59; + static const field core::List values = #C60; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS5 : super self::_EnumWithS5&_Enum&G::•(#index, #name) ; @@ -1371,8 +1371,8 @@ abstract class _EnumWithS6&_Enum&G = core::_Enum with self::G values = #C62; enum-element static const field self::EnumWithS6 a = #C61; + static const field core::List values = #C62; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS6 : super self::_EnumWithS6&_Enum&G::•(#index, #name) ; @@ -1385,8 +1385,8 @@ abstract class _EnumWithS7&_Enum&G = core::_Enum with self::G /*is ; } class EnumWithS7 extends self::_EnumWithS7&_Enum&G /*isEnum*/ { - static const field core::List values = #C64; enum-element static const field self::EnumWithS7 a = #C63; + static const field core::List values = #C64; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS7 : super self::_EnumWithS7&_Enum&G::•(#index, #name) ; @@ -1399,8 +1399,8 @@ abstract class _EnumWithS8&_Enum&G = core::_Enum with self::G /*isAno ; } class EnumWithS8 extends self::_EnumWithS8&_Enum&G /*isEnum*/ { - static const field core::List values = #C66; enum-element static const field self::EnumWithS8 a = #C65; + static const field core::List values = #C66; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS8 : super self::_EnumWithS8&_Enum&G::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/bounds_supertypes.dart.strong.modular.expect b/pkg/front_end/testcases/general/bounds_supertypes.dart.strong.modular.expect index 0100b3732f32..93ee82f373da 100644 --- a/pkg/front_end/testcases/general/bounds_supertypes.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/bounds_supertypes.dart.strong.modular.expect @@ -1040,8 +1040,8 @@ class WithS8 extends self::_WithS8&Object&G { ; } class EnumImplementsT1 extends core::_Enum implements self::Class> /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::EnumImplementsT1 a = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT1 : super core::_Enum::•(#index, #name) ; @@ -1049,8 +1049,8 @@ class EnumImplementsT1 extends core::_Enum implements self::Class /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::EnumImplementsT2 a = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT2 : super core::_Enum::•(#index, #name) ; @@ -1058,8 +1058,8 @@ class EnumImplementsT2 extends core::_Enum implements self::Class /*isE return "EnumImplementsT2.${this.{core::_Enum::_name}{core::String}}"; } class EnumImplementsT3 extends core::_Enum implements self::Class> /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::EnumImplementsT3 a = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT3 : super core::_Enum::•(#index, #name) ; @@ -1067,8 +1067,8 @@ class EnumImplementsT3 extends core::_Enum implements self::Class> /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::EnumImplementsT4 a = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT4 : super core::_Enum::•(#index, #name) ; @@ -1076,8 +1076,8 @@ class EnumImplementsT4 extends core::_Enum implements self::Class /*isEnum*/ { - static const field core::List values = #C12; enum-element static const field self::EnumImplementsT5 a = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT5 : super core::_Enum::•(#index, #name) ; @@ -1085,8 +1085,8 @@ class EnumImplementsT5 extends core::_Enum implements self::Class> /*isEnum*/ { - static const field core::List values = #C14; enum-element static const field self::EnumImplementsT6 a = #C13; + static const field core::List values = #C14; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT6 : super core::_Enum::•(#index, #name) ; @@ -1094,8 +1094,8 @@ class EnumImplementsT6 extends core::_Enum implements self::Class /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field self::EnumImplementsT7 a = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT7 : super core::_Enum::•(#index, #name) ; @@ -1103,8 +1103,8 @@ class EnumImplementsT7 extends core::_Enum implements self::Class return "EnumImplementsT7.${this.{core::_Enum::_name}{core::String}}"; } class EnumImplementsT8 extends core::_Enum implements self::Class /*isEnum*/ { - static const field core::List values = #C18; enum-element static const field self::EnumImplementsT8 a = #C17; + static const field core::List values = #C18; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT8 : super core::_Enum::•(#index, #name) ; @@ -1112,8 +1112,8 @@ class EnumImplementsT8 extends core::_Enum implements self::Class /*i return "EnumImplementsT8.${this.{core::_Enum::_name}{core::String}}"; } class EnumImplementsS1 extends core::_Enum implements self::G> /*isEnum*/ { - static const field core::List values = #C20; enum-element static const field self::EnumImplementsS1 a = #C19; + static const field core::List values = #C20; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS1 : super core::_Enum::•(#index, #name) ; @@ -1121,8 +1121,8 @@ class EnumImplementsS1 extends core::_Enum implements self::G /*isEnum*/ { - static const field core::List values = #C22; enum-element static const field self::EnumImplementsS2 a = #C21; + static const field core::List values = #C22; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS2 : super core::_Enum::•(#index, #name) ; @@ -1130,8 +1130,8 @@ class EnumImplementsS2 extends core::_Enum implements self::G /*isEnum* return "EnumImplementsS2.${this.{core::_Enum::_name}{core::String}}"; } class EnumImplementsS3 extends core::_Enum implements self::G> /*isEnum*/ { - static const field core::List values = #C24; enum-element static const field self::EnumImplementsS3 a = #C23; + static const field core::List values = #C24; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS3 : super core::_Enum::•(#index, #name) ; @@ -1139,8 +1139,8 @@ class EnumImplementsS3 extends core::_Enum implements self::G> /*isEnum*/ { - static const field core::List values = #C26; enum-element static const field self::EnumImplementsS4 a = #C25; + static const field core::List values = #C26; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS4 : super core::_Enum::•(#index, #name) ; @@ -1148,8 +1148,8 @@ class EnumImplementsS4 extends core::_Enum implements self::G /*isEnum*/ { - static const field core::List values = #C28; enum-element static const field self::EnumImplementsS5 a = #C27; + static const field core::List values = #C28; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS5 : super core::_Enum::•(#index, #name) ; @@ -1157,8 +1157,8 @@ class EnumImplementsS5 extends core::_Enum implements self::G> /*isEnum*/ { - static const field core::List values = #C30; enum-element static const field self::EnumImplementsS6 a = #C29; + static const field core::List values = #C30; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS6 : super core::_Enum::•(#index, #name) ; @@ -1166,8 +1166,8 @@ class EnumImplementsS6 extends core::_Enum implements self::G /*isEnum*/ { - static const field core::List values = #C32; enum-element static const field self::EnumImplementsS7 a = #C31; + static const field core::List values = #C32; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS7 : super core::_Enum::•(#index, #name) ; @@ -1175,8 +1175,8 @@ class EnumImplementsS7 extends core::_Enum implements self::G /*is return "EnumImplementsS7.${this.{core::_Enum::_name}{core::String}}"; } class EnumImplementsS8 extends core::_Enum implements self::G /*isEnum*/ { - static const field core::List values = #C34; enum-element static const field self::EnumImplementsS8 a = #C33; + static const field core::List values = #C34; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS8 : super core::_Enum::•(#index, #name) ; @@ -1189,8 +1189,8 @@ abstract class _EnumWithT1&_Enum&F = core::_Enum with self::Class values = #C36; enum-element static const field self::EnumWithT1 a = #C35; + static const field core::List values = #C36; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT1 : super self::_EnumWithT1&_Enum&F::•(#index, #name) ; @@ -1203,8 +1203,8 @@ abstract class _EnumWithT2&_Enum&F = core::_Enum with self::Class /*isA ; } class EnumWithT2 extends self::_EnumWithT2&_Enum&F /*isEnum*/ { - static const field core::List values = #C38; enum-element static const field self::EnumWithT2 a = #C37; + static const field core::List values = #C38; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT2 : super self::_EnumWithT2&_Enum&F::•(#index, #name) ; @@ -1217,8 +1217,8 @@ abstract class _EnumWithT3&_Enum&F = core::_Enum with self::Class values = #C40; enum-element static const field self::EnumWithT3 a = #C39; + static const field core::List values = #C40; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT3 : super self::_EnumWithT3&_Enum&F::•(#index, #name) ; @@ -1231,8 +1231,8 @@ abstract class _EnumWithT4&_Enum&F = core::_Enum with self::Class values = #C42; enum-element static const field self::EnumWithT4 a = #C41; + static const field core::List values = #C42; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT4 : super self::_EnumWithT4&_Enum&F::•(#index, #name) ; @@ -1245,8 +1245,8 @@ abstract class _EnumWithT5&_Enum&F = core::_Enum with self::Class values = #C44; enum-element static const field self::EnumWithT5 a = #C43; + static const field core::List values = #C44; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT5 : super self::_EnumWithT5&_Enum&F::•(#index, #name) ; @@ -1259,8 +1259,8 @@ abstract class _EnumWithT6&_Enum&F = core::_Enum with self::Class values = #C46; enum-element static const field self::EnumWithT6 a = #C45; + static const field core::List values = #C46; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT6 : super self::_EnumWithT6&_Enum&F::•(#index, #name) ; @@ -1273,8 +1273,8 @@ abstract class _EnumWithT7&_Enum&F = core::_Enum with self::Class ; } class EnumWithT7 extends self::_EnumWithT7&_Enum&F /*isEnum*/ { - static const field core::List values = #C48; enum-element static const field self::EnumWithT7 a = #C47; + static const field core::List values = #C48; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT7 : super self::_EnumWithT7&_Enum&F::•(#index, #name) ; @@ -1287,8 +1287,8 @@ abstract class _EnumWithT8&_Enum&F = core::_Enum with self::Class /*i ; } class EnumWithT8 extends self::_EnumWithT8&_Enum&F /*isEnum*/ { - static const field core::List values = #C50; enum-element static const field self::EnumWithT8 a = #C49; + static const field core::List values = #C50; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT8 : super self::_EnumWithT8&_Enum&F::•(#index, #name) ; @@ -1301,8 +1301,8 @@ abstract class _EnumWithS1&_Enum&G = core::_Enum with self::G values = #C52; enum-element static const field self::EnumWithS1 a = #C51; + static const field core::List values = #C52; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS1 : super self::_EnumWithS1&_Enum&G::•(#index, #name) ; @@ -1315,8 +1315,8 @@ abstract class _EnumWithS2&_Enum&G = core::_Enum with self::G /*isAnony ; } class EnumWithS2 extends self::_EnumWithS2&_Enum&G /*isEnum*/ { - static const field core::List values = #C54; enum-element static const field self::EnumWithS2 a = #C53; + static const field core::List values = #C54; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS2 : super self::_EnumWithS2&_Enum&G::•(#index, #name) ; @@ -1329,8 +1329,8 @@ abstract class _EnumWithS3&_Enum&G = core::_Enum with self::G values = #C56; enum-element static const field self::EnumWithS3 a = #C55; + static const field core::List values = #C56; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS3 : super self::_EnumWithS3&_Enum&G::•(#index, #name) ; @@ -1343,8 +1343,8 @@ abstract class _EnumWithS4&_Enum&G = core::_Enum with self::G values = #C58; enum-element static const field self::EnumWithS4 a = #C57; + static const field core::List values = #C58; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS4 : super self::_EnumWithS4&_Enum&G::•(#index, #name) ; @@ -1357,8 +1357,8 @@ abstract class _EnumWithS5&_Enum&G = core::_Enum with self::G values = #C60; enum-element static const field self::EnumWithS5 a = #C59; + static const field core::List values = #C60; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS5 : super self::_EnumWithS5&_Enum&G::•(#index, #name) ; @@ -1371,8 +1371,8 @@ abstract class _EnumWithS6&_Enum&G = core::_Enum with self::G values = #C62; enum-element static const field self::EnumWithS6 a = #C61; + static const field core::List values = #C62; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS6 : super self::_EnumWithS6&_Enum&G::•(#index, #name) ; @@ -1385,8 +1385,8 @@ abstract class _EnumWithS7&_Enum&G = core::_Enum with self::G /*is ; } class EnumWithS7 extends self::_EnumWithS7&_Enum&G /*isEnum*/ { - static const field core::List values = #C64; enum-element static const field self::EnumWithS7 a = #C63; + static const field core::List values = #C64; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS7 : super self::_EnumWithS7&_Enum&G::•(#index, #name) ; @@ -1399,8 +1399,8 @@ abstract class _EnumWithS8&_Enum&G = core::_Enum with self::G /*isAno ; } class EnumWithS8 extends self::_EnumWithS8&_Enum&G /*isEnum*/ { - static const field core::List values = #C66; enum-element static const field self::EnumWithS8 a = #C65; + static const field core::List values = #C66; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS8 : super self::_EnumWithS8&_Enum&G::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/bounds_supertypes.dart.strong.outline.expect b/pkg/front_end/testcases/general/bounds_supertypes.dart.strong.outline.expect index 03a8e7a6a224..6619aca85ecc 100644 --- a/pkg/front_end/testcases/general/bounds_supertypes.dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/bounds_supertypes.dart.strong.outline.expect @@ -989,8 +989,8 @@ class WithS8 extends self::_WithS8&Object&G { ; } class EnumImplementsT1 extends core::_Enum implements self::Class> /*isEnum*/ { - static const field core::List values = const [self::EnumImplementsT1::a]; enum-element static const field self::EnumImplementsT1 a = const self::EnumImplementsT1::•(0, "a"); + static const field core::List values = const [self::EnumImplementsT1::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT1 : super core::_Enum::•(#index, #name) ; @@ -998,8 +998,8 @@ class EnumImplementsT1 extends core::_Enum implements self::Class /*isEnum*/ { - static const field core::List values = const [self::EnumImplementsT2::a]; enum-element static const field self::EnumImplementsT2 a = const self::EnumImplementsT2::•(0, "a"); + static const field core::List values = const [self::EnumImplementsT2::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT2 : super core::_Enum::•(#index, #name) ; @@ -1007,8 +1007,8 @@ class EnumImplementsT2 extends core::_Enum implements self::Class /*isE return "EnumImplementsT2.${this.{core::_Enum::_name}{core::String}}"; } class EnumImplementsT3 extends core::_Enum implements self::Class> /*isEnum*/ { - static const field core::List values = const [self::EnumImplementsT3::a]; enum-element static const field self::EnumImplementsT3 a = const self::EnumImplementsT3::•(0, "a"); + static const field core::List values = const [self::EnumImplementsT3::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT3 : super core::_Enum::•(#index, #name) ; @@ -1016,8 +1016,8 @@ class EnumImplementsT3 extends core::_Enum implements self::Class> /*isEnum*/ { - static const field core::List values = const [self::EnumImplementsT4::a]; enum-element static const field self::EnumImplementsT4 a = const self::EnumImplementsT4::•(0, "a"); + static const field core::List values = const [self::EnumImplementsT4::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT4 : super core::_Enum::•(#index, #name) ; @@ -1025,8 +1025,8 @@ class EnumImplementsT4 extends core::_Enum implements self::Class /*isEnum*/ { - static const field core::List values = const [self::EnumImplementsT5::a]; enum-element static const field self::EnumImplementsT5 a = const self::EnumImplementsT5::•(0, "a"); + static const field core::List values = const [self::EnumImplementsT5::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT5 : super core::_Enum::•(#index, #name) ; @@ -1034,8 +1034,8 @@ class EnumImplementsT5 extends core::_Enum implements self::Class> /*isEnum*/ { - static const field core::List values = const [self::EnumImplementsT6::a]; enum-element static const field self::EnumImplementsT6 a = const self::EnumImplementsT6::•(0, "a"); + static const field core::List values = const [self::EnumImplementsT6::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT6 : super core::_Enum::•(#index, #name) ; @@ -1043,8 +1043,8 @@ class EnumImplementsT6 extends core::_Enum implements self::Class /*isEnum*/ { - static const field core::List values = const [self::EnumImplementsT7::a]; enum-element static const field self::EnumImplementsT7 a = const self::EnumImplementsT7::•(0, "a"); + static const field core::List values = const [self::EnumImplementsT7::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT7 : super core::_Enum::•(#index, #name) ; @@ -1052,8 +1052,8 @@ class EnumImplementsT7 extends core::_Enum implements self::Class return "EnumImplementsT7.${this.{core::_Enum::_name}{core::String}}"; } class EnumImplementsT8 extends core::_Enum implements self::Class /*isEnum*/ { - static const field core::List values = const [self::EnumImplementsT8::a]; enum-element static const field self::EnumImplementsT8 a = const self::EnumImplementsT8::•(0, "a"); + static const field core::List values = const [self::EnumImplementsT8::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT8 : super core::_Enum::•(#index, #name) ; @@ -1061,8 +1061,8 @@ class EnumImplementsT8 extends core::_Enum implements self::Class /*i return "EnumImplementsT8.${this.{core::_Enum::_name}{core::String}}"; } class EnumImplementsS1 extends core::_Enum implements self::G> /*isEnum*/ { - static const field core::List values = const [self::EnumImplementsS1::a]; enum-element static const field self::EnumImplementsS1 a = const self::EnumImplementsS1::•(0, "a"); + static const field core::List values = const [self::EnumImplementsS1::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS1 : super core::_Enum::•(#index, #name) ; @@ -1070,8 +1070,8 @@ class EnumImplementsS1 extends core::_Enum implements self::G /*isEnum*/ { - static const field core::List values = const [self::EnumImplementsS2::a]; enum-element static const field self::EnumImplementsS2 a = const self::EnumImplementsS2::•(0, "a"); + static const field core::List values = const [self::EnumImplementsS2::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS2 : super core::_Enum::•(#index, #name) ; @@ -1079,8 +1079,8 @@ class EnumImplementsS2 extends core::_Enum implements self::G /*isEnum* return "EnumImplementsS2.${this.{core::_Enum::_name}{core::String}}"; } class EnumImplementsS3 extends core::_Enum implements self::G> /*isEnum*/ { - static const field core::List values = const [self::EnumImplementsS3::a]; enum-element static const field self::EnumImplementsS3 a = const self::EnumImplementsS3::•(0, "a"); + static const field core::List values = const [self::EnumImplementsS3::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS3 : super core::_Enum::•(#index, #name) ; @@ -1088,8 +1088,8 @@ class EnumImplementsS3 extends core::_Enum implements self::G> /*isEnum*/ { - static const field core::List values = const [self::EnumImplementsS4::a]; enum-element static const field self::EnumImplementsS4 a = const self::EnumImplementsS4::•(0, "a"); + static const field core::List values = const [self::EnumImplementsS4::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS4 : super core::_Enum::•(#index, #name) ; @@ -1097,8 +1097,8 @@ class EnumImplementsS4 extends core::_Enum implements self::G /*isEnum*/ { - static const field core::List values = const [self::EnumImplementsS5::a]; enum-element static const field self::EnumImplementsS5 a = const self::EnumImplementsS5::•(0, "a"); + static const field core::List values = const [self::EnumImplementsS5::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS5 : super core::_Enum::•(#index, #name) ; @@ -1106,8 +1106,8 @@ class EnumImplementsS5 extends core::_Enum implements self::G> /*isEnum*/ { - static const field core::List values = const [self::EnumImplementsS6::a]; enum-element static const field self::EnumImplementsS6 a = const self::EnumImplementsS6::•(0, "a"); + static const field core::List values = const [self::EnumImplementsS6::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS6 : super core::_Enum::•(#index, #name) ; @@ -1115,8 +1115,8 @@ class EnumImplementsS6 extends core::_Enum implements self::G /*isEnum*/ { - static const field core::List values = const [self::EnumImplementsS7::a]; enum-element static const field self::EnumImplementsS7 a = const self::EnumImplementsS7::•(0, "a"); + static const field core::List values = const [self::EnumImplementsS7::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS7 : super core::_Enum::•(#index, #name) ; @@ -1124,8 +1124,8 @@ class EnumImplementsS7 extends core::_Enum implements self::G /*is return "EnumImplementsS7.${this.{core::_Enum::_name}{core::String}}"; } class EnumImplementsS8 extends core::_Enum implements self::G /*isEnum*/ { - static const field core::List values = const [self::EnumImplementsS8::a]; enum-element static const field self::EnumImplementsS8 a = const self::EnumImplementsS8::•(0, "a"); + static const field core::List values = const [self::EnumImplementsS8::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS8 : super core::_Enum::•(#index, #name) ; @@ -1138,8 +1138,8 @@ abstract class _EnumWithT1&_Enum&F = core::_Enum with self::Class values = const [self::EnumWithT1::a]; enum-element static const field self::EnumWithT1 a = const self::EnumWithT1::•(0, "a"); + static const field core::List values = const [self::EnumWithT1::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT1 : super self::_EnumWithT1&_Enum&F::•(#index, #name) ; @@ -1152,8 +1152,8 @@ abstract class _EnumWithT2&_Enum&F = core::_Enum with self::Class /*isA ; } class EnumWithT2 extends self::_EnumWithT2&_Enum&F /*isEnum*/ { - static const field core::List values = const [self::EnumWithT2::a]; enum-element static const field self::EnumWithT2 a = const self::EnumWithT2::•(0, "a"); + static const field core::List values = const [self::EnumWithT2::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT2 : super self::_EnumWithT2&_Enum&F::•(#index, #name) ; @@ -1166,8 +1166,8 @@ abstract class _EnumWithT3&_Enum&F = core::_Enum with self::Class values = const [self::EnumWithT3::a]; enum-element static const field self::EnumWithT3 a = const self::EnumWithT3::•(0, "a"); + static const field core::List values = const [self::EnumWithT3::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT3 : super self::_EnumWithT3&_Enum&F::•(#index, #name) ; @@ -1180,8 +1180,8 @@ abstract class _EnumWithT4&_Enum&F = core::_Enum with self::Class values = const [self::EnumWithT4::a]; enum-element static const field self::EnumWithT4 a = const self::EnumWithT4::•(0, "a"); + static const field core::List values = const [self::EnumWithT4::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT4 : super self::_EnumWithT4&_Enum&F::•(#index, #name) ; @@ -1194,8 +1194,8 @@ abstract class _EnumWithT5&_Enum&F = core::_Enum with self::Class values = const [self::EnumWithT5::a]; enum-element static const field self::EnumWithT5 a = const self::EnumWithT5::•(0, "a"); + static const field core::List values = const [self::EnumWithT5::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT5 : super self::_EnumWithT5&_Enum&F::•(#index, #name) ; @@ -1208,8 +1208,8 @@ abstract class _EnumWithT6&_Enum&F = core::_Enum with self::Class values = const [self::EnumWithT6::a]; enum-element static const field self::EnumWithT6 a = const self::EnumWithT6::•(0, "a"); + static const field core::List values = const [self::EnumWithT6::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT6 : super self::_EnumWithT6&_Enum&F::•(#index, #name) ; @@ -1222,8 +1222,8 @@ abstract class _EnumWithT7&_Enum&F = core::_Enum with self::Class ; } class EnumWithT7 extends self::_EnumWithT7&_Enum&F /*isEnum*/ { - static const field core::List values = const [self::EnumWithT7::a]; enum-element static const field self::EnumWithT7 a = const self::EnumWithT7::•(0, "a"); + static const field core::List values = const [self::EnumWithT7::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT7 : super self::_EnumWithT7&_Enum&F::•(#index, #name) ; @@ -1236,8 +1236,8 @@ abstract class _EnumWithT8&_Enum&F = core::_Enum with self::Class /*i ; } class EnumWithT8 extends self::_EnumWithT8&_Enum&F /*isEnum*/ { - static const field core::List values = const [self::EnumWithT8::a]; enum-element static const field self::EnumWithT8 a = const self::EnumWithT8::•(0, "a"); + static const field core::List values = const [self::EnumWithT8::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT8 : super self::_EnumWithT8&_Enum&F::•(#index, #name) ; @@ -1250,8 +1250,8 @@ abstract class _EnumWithS1&_Enum&G = core::_Enum with self::G values = const [self::EnumWithS1::a]; enum-element static const field self::EnumWithS1 a = const self::EnumWithS1::•(0, "a"); + static const field core::List values = const [self::EnumWithS1::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS1 : super self::_EnumWithS1&_Enum&G::•(#index, #name) ; @@ -1264,8 +1264,8 @@ abstract class _EnumWithS2&_Enum&G = core::_Enum with self::G /*isAnony ; } class EnumWithS2 extends self::_EnumWithS2&_Enum&G /*isEnum*/ { - static const field core::List values = const [self::EnumWithS2::a]; enum-element static const field self::EnumWithS2 a = const self::EnumWithS2::•(0, "a"); + static const field core::List values = const [self::EnumWithS2::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS2 : super self::_EnumWithS2&_Enum&G::•(#index, #name) ; @@ -1278,8 +1278,8 @@ abstract class _EnumWithS3&_Enum&G = core::_Enum with self::G values = const [self::EnumWithS3::a]; enum-element static const field self::EnumWithS3 a = const self::EnumWithS3::•(0, "a"); + static const field core::List values = const [self::EnumWithS3::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS3 : super self::_EnumWithS3&_Enum&G::•(#index, #name) ; @@ -1292,8 +1292,8 @@ abstract class _EnumWithS4&_Enum&G = core::_Enum with self::G values = const [self::EnumWithS4::a]; enum-element static const field self::EnumWithS4 a = const self::EnumWithS4::•(0, "a"); + static const field core::List values = const [self::EnumWithS4::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS4 : super self::_EnumWithS4&_Enum&G::•(#index, #name) ; @@ -1306,8 +1306,8 @@ abstract class _EnumWithS5&_Enum&G = core::_Enum with self::G values = const [self::EnumWithS5::a]; enum-element static const field self::EnumWithS5 a = const self::EnumWithS5::•(0, "a"); + static const field core::List values = const [self::EnumWithS5::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS5 : super self::_EnumWithS5&_Enum&G::•(#index, #name) ; @@ -1320,8 +1320,8 @@ abstract class _EnumWithS6&_Enum&G = core::_Enum with self::G values = const [self::EnumWithS6::a]; enum-element static const field self::EnumWithS6 a = const self::EnumWithS6::•(0, "a"); + static const field core::List values = const [self::EnumWithS6::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS6 : super self::_EnumWithS6&_Enum&G::•(#index, #name) ; @@ -1334,8 +1334,8 @@ abstract class _EnumWithS7&_Enum&G = core::_Enum with self::G /*is ; } class EnumWithS7 extends self::_EnumWithS7&_Enum&G /*isEnum*/ { - static const field core::List values = const [self::EnumWithS7::a]; enum-element static const field self::EnumWithS7 a = const self::EnumWithS7::•(0, "a"); + static const field core::List values = const [self::EnumWithS7::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS7 : super self::_EnumWithS7&_Enum&G::•(#index, #name) ; @@ -1348,8 +1348,8 @@ abstract class _EnumWithS8&_Enum&G = core::_Enum with self::G /*isAno ; } class EnumWithS8 extends self::_EnumWithS8&_Enum&G /*isEnum*/ { - static const field core::List values = const [self::EnumWithS8::a]; enum-element static const field self::EnumWithS8 a = const self::EnumWithS8::•(0, "a"); + static const field core::List values = const [self::EnumWithS8::a]; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS8 : super self::_EnumWithS8&_Enum&G::•(#index, #name) ; @@ -1427,68 +1427,68 @@ static method _#F#new#tearOff = Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:109:6 -> ListConstant(const [const EnumImplementsT1{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:109:50 -> InstanceConstant(const EnumImplementsT1{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:111:6 -> ListConstant(const [const EnumImplementsT2{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:109:6 -> ListConstant(const [const EnumImplementsT1{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:111:59 -> InstanceConstant(const EnumImplementsT2{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:113:6 -> ListConstant(const [const EnumImplementsT3{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:111:6 -> ListConstant(const [const EnumImplementsT2{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:113:57 -> InstanceConstant(const EnumImplementsT3{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:115:6 -> ListConstant(const [const EnumImplementsT4{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:113:6 -> ListConstant(const [const EnumImplementsT3{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:115:66 -> InstanceConstant(const EnumImplementsT4{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:117:6 -> ListConstant(const [const EnumImplementsT5{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:115:6 -> ListConstant(const [const EnumImplementsT4{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:117:62 -> InstanceConstant(const EnumImplementsT5{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:119:6 -> ListConstant(const [const EnumImplementsT6{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:117:6 -> ListConstant(const [const EnumImplementsT5{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:119:69 -> InstanceConstant(const EnumImplementsT6{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:121:6 -> ListConstant(const [const EnumImplementsT7{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:119:6 -> ListConstant(const [const EnumImplementsT6{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:121:58 -> InstanceConstant(const EnumImplementsT7{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:123:6 -> ListConstant(const [const EnumImplementsT8{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:121:6 -> ListConstant(const [const EnumImplementsT7{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:123:55 -> InstanceConstant(const EnumImplementsT8{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:125:6 -> ListConstant(const [const EnumImplementsS1{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:123:6 -> ListConstant(const [const EnumImplementsT8{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:125:50 -> InstanceConstant(const EnumImplementsS1{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:127:6 -> ListConstant(const [const EnumImplementsS2{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:125:6 -> ListConstant(const [const EnumImplementsS1{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:127:59 -> InstanceConstant(const EnumImplementsS2{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:129:6 -> ListConstant(const [const EnumImplementsS3{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:127:6 -> ListConstant(const [const EnumImplementsS2{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:129:57 -> InstanceConstant(const EnumImplementsS3{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:131:6 -> ListConstant(const [const EnumImplementsS4{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:129:6 -> ListConstant(const [const EnumImplementsS3{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:131:66 -> InstanceConstant(const EnumImplementsS4{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:133:6 -> ListConstant(const [const EnumImplementsS5{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:131:6 -> ListConstant(const [const EnumImplementsS4{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:133:62 -> InstanceConstant(const EnumImplementsS5{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:135:6 -> ListConstant(const [const EnumImplementsS6{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:133:6 -> ListConstant(const [const EnumImplementsS5{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:135:69 -> InstanceConstant(const EnumImplementsS6{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:137:6 -> ListConstant(const [const EnumImplementsS7{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:135:6 -> ListConstant(const [const EnumImplementsS6{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:137:58 -> InstanceConstant(const EnumImplementsS7{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:139:6 -> ListConstant(const [const EnumImplementsS8{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:137:6 -> ListConstant(const [const EnumImplementsS7{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:139:55 -> InstanceConstant(const EnumImplementsS8{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:141:6 -> ListConstant(const [const EnumWithT1{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:139:6 -> ListConstant(const [const EnumImplementsS8{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:141:38 -> InstanceConstant(const EnumWithT1{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:143:6 -> ListConstant(const [const EnumWithT2{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:141:6 -> ListConstant(const [const EnumWithT1{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:143:47 -> InstanceConstant(const EnumWithT2{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:145:6 -> ListConstant(const [const EnumWithT3{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:143:6 -> ListConstant(const [const EnumWithT2{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:145:45 -> InstanceConstant(const EnumWithT3{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:147:6 -> ListConstant(const [const EnumWithT4{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:145:6 -> ListConstant(const [const EnumWithT3{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:147:54 -> InstanceConstant(const EnumWithT4{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:149:6 -> ListConstant(const [const EnumWithT5{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:147:6 -> ListConstant(const [const EnumWithT4{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:149:50 -> InstanceConstant(const EnumWithT5{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:151:6 -> ListConstant(const [const EnumWithT6{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:149:6 -> ListConstant(const [const EnumWithT5{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:151:57 -> InstanceConstant(const EnumWithT6{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:153:6 -> ListConstant(const [const EnumWithT7{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:151:6 -> ListConstant(const [const EnumWithT6{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:153:46 -> InstanceConstant(const EnumWithT7{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:155:6 -> ListConstant(const [const EnumWithT8{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:153:6 -> ListConstant(const [const EnumWithT7{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:155:43 -> InstanceConstant(const EnumWithT8{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:157:6 -> ListConstant(const [const EnumWithS1{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:155:6 -> ListConstant(const [const EnumWithT8{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:157:38 -> InstanceConstant(const EnumWithS1{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:159:6 -> ListConstant(const [const EnumWithS2{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:157:6 -> ListConstant(const [const EnumWithS1{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:159:47 -> InstanceConstant(const EnumWithS2{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:161:6 -> ListConstant(const [const EnumWithS3{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:159:6 -> ListConstant(const [const EnumWithS2{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:161:45 -> InstanceConstant(const EnumWithS3{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:163:6 -> ListConstant(const [const EnumWithS4{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:161:6 -> ListConstant(const [const EnumWithS3{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:163:54 -> InstanceConstant(const EnumWithS4{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:165:6 -> ListConstant(const [const EnumWithS5{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:163:6 -> ListConstant(const [const EnumWithS4{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:165:50 -> InstanceConstant(const EnumWithS5{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:167:6 -> ListConstant(const [const EnumWithS6{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:165:6 -> ListConstant(const [const EnumWithS5{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:167:57 -> InstanceConstant(const EnumWithS6{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:169:6 -> ListConstant(const [const EnumWithS7{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:167:6 -> ListConstant(const [const EnumWithS6{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:169:46 -> InstanceConstant(const EnumWithS7{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:171:6 -> ListConstant(const [const EnumWithS8{_Enum.index: 0, _Enum._name: "a"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:169:6 -> ListConstant(const [const EnumWithS7{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_supertypes.dart:171:43 -> InstanceConstant(const EnumWithS8{_Enum.index: 0, _Enum._name: "a"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///bounds_supertypes.dart:171:6 -> ListConstant(const [const EnumWithS8{_Enum.index: 0, _Enum._name: "a"}]) Extra constant evaluation: evaluated: 257, effectively constant: 64 diff --git a/pkg/front_end/testcases/general/bounds_supertypes.dart.strong.transformed.expect b/pkg/front_end/testcases/general/bounds_supertypes.dart.strong.transformed.expect index 1fce11ee2627..a165033e1eff 100644 --- a/pkg/front_end/testcases/general/bounds_supertypes.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/bounds_supertypes.dart.strong.transformed.expect @@ -1040,8 +1040,8 @@ class WithS8 extends self::_WithS8&Object&G { ; } class EnumImplementsT1 extends core::_Enum implements self::Class> /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::EnumImplementsT1 a = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT1 : super core::_Enum::•(#index, #name) ; @@ -1049,8 +1049,8 @@ class EnumImplementsT1 extends core::_Enum implements self::Class /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::EnumImplementsT2 a = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT2 : super core::_Enum::•(#index, #name) ; @@ -1058,8 +1058,8 @@ class EnumImplementsT2 extends core::_Enum implements self::Class /*isE return "EnumImplementsT2.${this.{core::_Enum::_name}{core::String}}"; } class EnumImplementsT3 extends core::_Enum implements self::Class> /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::EnumImplementsT3 a = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT3 : super core::_Enum::•(#index, #name) ; @@ -1067,8 +1067,8 @@ class EnumImplementsT3 extends core::_Enum implements self::Class> /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::EnumImplementsT4 a = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT4 : super core::_Enum::•(#index, #name) ; @@ -1076,8 +1076,8 @@ class EnumImplementsT4 extends core::_Enum implements self::Class /*isEnum*/ { - static const field core::List values = #C12; enum-element static const field self::EnumImplementsT5 a = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT5 : super core::_Enum::•(#index, #name) ; @@ -1085,8 +1085,8 @@ class EnumImplementsT5 extends core::_Enum implements self::Class> /*isEnum*/ { - static const field core::List values = #C14; enum-element static const field self::EnumImplementsT6 a = #C13; + static const field core::List values = #C14; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT6 : super core::_Enum::•(#index, #name) ; @@ -1094,8 +1094,8 @@ class EnumImplementsT6 extends core::_Enum implements self::Class /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field self::EnumImplementsT7 a = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT7 : super core::_Enum::•(#index, #name) ; @@ -1103,8 +1103,8 @@ class EnumImplementsT7 extends core::_Enum implements self::Class return "EnumImplementsT7.${this.{core::_Enum::_name}{core::String}}"; } class EnumImplementsT8 extends core::_Enum implements self::Class /*isEnum*/ { - static const field core::List values = #C18; enum-element static const field self::EnumImplementsT8 a = #C17; + static const field core::List values = #C18; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsT8 : super core::_Enum::•(#index, #name) ; @@ -1112,8 +1112,8 @@ class EnumImplementsT8 extends core::_Enum implements self::Class /*i return "EnumImplementsT8.${this.{core::_Enum::_name}{core::String}}"; } class EnumImplementsS1 extends core::_Enum implements self::G> /*isEnum*/ { - static const field core::List values = #C20; enum-element static const field self::EnumImplementsS1 a = #C19; + static const field core::List values = #C20; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS1 : super core::_Enum::•(#index, #name) ; @@ -1121,8 +1121,8 @@ class EnumImplementsS1 extends core::_Enum implements self::G /*isEnum*/ { - static const field core::List values = #C22; enum-element static const field self::EnumImplementsS2 a = #C21; + static const field core::List values = #C22; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS2 : super core::_Enum::•(#index, #name) ; @@ -1130,8 +1130,8 @@ class EnumImplementsS2 extends core::_Enum implements self::G /*isEnum* return "EnumImplementsS2.${this.{core::_Enum::_name}{core::String}}"; } class EnumImplementsS3 extends core::_Enum implements self::G> /*isEnum*/ { - static const field core::List values = #C24; enum-element static const field self::EnumImplementsS3 a = #C23; + static const field core::List values = #C24; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS3 : super core::_Enum::•(#index, #name) ; @@ -1139,8 +1139,8 @@ class EnumImplementsS3 extends core::_Enum implements self::G> /*isEnum*/ { - static const field core::List values = #C26; enum-element static const field self::EnumImplementsS4 a = #C25; + static const field core::List values = #C26; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS4 : super core::_Enum::•(#index, #name) ; @@ -1148,8 +1148,8 @@ class EnumImplementsS4 extends core::_Enum implements self::G /*isEnum*/ { - static const field core::List values = #C28; enum-element static const field self::EnumImplementsS5 a = #C27; + static const field core::List values = #C28; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS5 : super core::_Enum::•(#index, #name) ; @@ -1157,8 +1157,8 @@ class EnumImplementsS5 extends core::_Enum implements self::G> /*isEnum*/ { - static const field core::List values = #C30; enum-element static const field self::EnumImplementsS6 a = #C29; + static const field core::List values = #C30; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS6 : super core::_Enum::•(#index, #name) ; @@ -1166,8 +1166,8 @@ class EnumImplementsS6 extends core::_Enum implements self::G /*isEnum*/ { - static const field core::List values = #C32; enum-element static const field self::EnumImplementsS7 a = #C31; + static const field core::List values = #C32; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS7 : super core::_Enum::•(#index, #name) ; @@ -1175,8 +1175,8 @@ class EnumImplementsS7 extends core::_Enum implements self::G /*is return "EnumImplementsS7.${this.{core::_Enum::_name}{core::String}}"; } class EnumImplementsS8 extends core::_Enum implements self::G /*isEnum*/ { - static const field core::List values = #C34; enum-element static const field self::EnumImplementsS8 a = #C33; + static const field core::List values = #C34; const synthetic constructor •(core::int #index, core::String #name) → self::EnumImplementsS8 : super core::_Enum::•(#index, #name) ; @@ -1189,8 +1189,8 @@ abstract class _EnumWithT1&_Enum&F extends core::_Enum implements self::Class values = #C36; enum-element static const field self::EnumWithT1 a = #C35; + static const field core::List values = #C36; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT1 : super self::_EnumWithT1&_Enum&F::•(#index, #name) ; @@ -1203,8 +1203,8 @@ abstract class _EnumWithT2&_Enum&F extends core::_Enum implements self::Class values = #C38; enum-element static const field self::EnumWithT2 a = #C37; + static const field core::List values = #C38; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT2 : super self::_EnumWithT2&_Enum&F::•(#index, #name) ; @@ -1217,8 +1217,8 @@ abstract class _EnumWithT3&_Enum&F extends core::_Enum implements self::Class values = #C40; enum-element static const field self::EnumWithT3 a = #C39; + static const field core::List values = #C40; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT3 : super self::_EnumWithT3&_Enum&F::•(#index, #name) ; @@ -1231,8 +1231,8 @@ abstract class _EnumWithT4&_Enum&F extends core::_Enum implements self::Class values = #C42; enum-element static const field self::EnumWithT4 a = #C41; + static const field core::List values = #C42; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT4 : super self::_EnumWithT4&_Enum&F::•(#index, #name) ; @@ -1245,8 +1245,8 @@ abstract class _EnumWithT5&_Enum&F extends core::_Enum implements self::Class values = #C44; enum-element static const field self::EnumWithT5 a = #C43; + static const field core::List values = #C44; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT5 : super self::_EnumWithT5&_Enum&F::•(#index, #name) ; @@ -1259,8 +1259,8 @@ abstract class _EnumWithT6&_Enum&F extends core::_Enum implements self::Class values = #C46; enum-element static const field self::EnumWithT6 a = #C45; + static const field core::List values = #C46; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT6 : super self::_EnumWithT6&_Enum&F::•(#index, #name) ; @@ -1273,8 +1273,8 @@ abstract class _EnumWithT7&_Enum&F extends core::_Enum implements self::Class values = #C48; enum-element static const field self::EnumWithT7 a = #C47; + static const field core::List values = #C48; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT7 : super self::_EnumWithT7&_Enum&F::•(#index, #name) ; @@ -1287,8 +1287,8 @@ abstract class _EnumWithT8&_Enum&F extends core::_Enum implements self::Class values = #C50; enum-element static const field self::EnumWithT8 a = #C49; + static const field core::List values = #C50; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithT8 : super self::_EnumWithT8&_Enum&F::•(#index, #name) ; @@ -1301,8 +1301,8 @@ abstract class _EnumWithS1&_Enum&G extends core::_Enum implements self::G values = #C52; enum-element static const field self::EnumWithS1 a = #C51; + static const field core::List values = #C52; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS1 : super self::_EnumWithS1&_Enum&G::•(#index, #name) ; @@ -1315,8 +1315,8 @@ abstract class _EnumWithS2&_Enum&G extends core::_Enum implements self::G values = #C54; enum-element static const field self::EnumWithS2 a = #C53; + static const field core::List values = #C54; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS2 : super self::_EnumWithS2&_Enum&G::•(#index, #name) ; @@ -1329,8 +1329,8 @@ abstract class _EnumWithS3&_Enum&G extends core::_Enum implements self::G values = #C56; enum-element static const field self::EnumWithS3 a = #C55; + static const field core::List values = #C56; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS3 : super self::_EnumWithS3&_Enum&G::•(#index, #name) ; @@ -1343,8 +1343,8 @@ abstract class _EnumWithS4&_Enum&G extends core::_Enum implements self::G values = #C58; enum-element static const field self::EnumWithS4 a = #C57; + static const field core::List values = #C58; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS4 : super self::_EnumWithS4&_Enum&G::•(#index, #name) ; @@ -1357,8 +1357,8 @@ abstract class _EnumWithS5&_Enum&G extends core::_Enum implements self::G values = #C60; enum-element static const field self::EnumWithS5 a = #C59; + static const field core::List values = #C60; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS5 : super self::_EnumWithS5&_Enum&G::•(#index, #name) ; @@ -1371,8 +1371,8 @@ abstract class _EnumWithS6&_Enum&G extends core::_Enum implements self::G values = #C62; enum-element static const field self::EnumWithS6 a = #C61; + static const field core::List values = #C62; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS6 : super self::_EnumWithS6&_Enum&G::•(#index, #name) ; @@ -1385,8 +1385,8 @@ abstract class _EnumWithS7&_Enum&G extends core::_Enum implements self::G values = #C64; enum-element static const field self::EnumWithS7 a = #C63; + static const field core::List values = #C64; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS7 : super self::_EnumWithS7&_Enum&G::•(#index, #name) ; @@ -1399,8 +1399,8 @@ abstract class _EnumWithS8&_Enum&G extends core::_Enum implements self::G values = #C66; enum-element static const field self::EnumWithS8 a = #C65; + static const field core::List values = #C66; const synthetic constructor •(core::int #index, core::String #name) → self::EnumWithS8 : super self::_EnumWithS8&_Enum&G::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/bounds_type_parameters.dart.strong.expect b/pkg/front_end/testcases/general/bounds_type_parameters.dart.strong.expect index bc83a2ed25bf..e11723dc4d70 100644 --- a/pkg/front_end/testcases/general/bounds_type_parameters.dart.strong.expect +++ b/pkg/front_end/testcases/general/bounds_type_parameters.dart.strong.expect @@ -1878,6 +1878,7 @@ class Class2 = dynamic, T2 extends dynamic, T3 e abstract class Mixin1 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic, U1 extends (self::Class, core::int) = dynamic, U2 extends (dynamic, core::int) = dynamic, U3 extends (self::Class, core::int) = dynamic, U4 extends (self::Class, core::int) = dynamic, U5 extends (self::ConcreteClass, core::int) = dynamic, U6 extends (self::Class, core::int) = dynamic, U7 extends (core::Object, core::int) = dynamic, U8 extends (core::int, core::int) = dynamic, V1 extends ({required a: self::G>, required b: core::int}) = dynamic, V2 extends ({required a: self::G, required b: core::int}) = dynamic, V3 extends ({required a: self::G>, required b: core::int}) = dynamic, V4 extends ({required a: self::G>, required b: core::int}) = dynamic, V5 extends ({required a: self::G, required b: core::int}) = dynamic, V6 extends ({required a: self::G>, required b: core::int}) = dynamic, V7 extends ({required a: self::G, required b: core::int}) = dynamic, V8 extends ({required a: self::G, required b: core::int}) = dynamic, W1 extends self::H<(self::Class, core::int)> = dynamic, W2 extends self::H = dynamic, W3 extends self::H<(self::Class, core::int)> = dynamic, W4 extends self::H<(self::Class, core::int)> = dynamic, W5 extends self::H<(self::ConcreteClass, core::int)> = dynamic, W6 extends self::H<(self::Class, core::int)> = dynamic, W7 extends self::H<(core::Object, core::int)> = dynamic, W8 extends self::H<(core::int, core::int)> = dynamic> extends core::Object /*isMixinDeclaration*/ { } class Enum1 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic, U1 extends (self::Class, core::int) = dynamic, U2 extends (dynamic, core::int) = dynamic, U3 extends (self::Class, core::int) = dynamic, U4 extends (self::Class, core::int) = dynamic, U5 extends (self::ConcreteClass, core::int) = dynamic, U6 extends (self::Class, core::int) = dynamic, U7 extends (core::Object, core::int) = dynamic, U8 extends (core::int, core::int) = dynamic, V1 extends ({required a: self::G>, required b: core::int}) = dynamic, V2 extends ({required a: self::G, required b: core::int}) = dynamic, V3 extends ({required a: self::G>, required b: core::int}) = dynamic, V4 extends ({required a: self::G>, required b: core::int}) = dynamic, V5 extends ({required a: self::G, required b: core::int}) = dynamic, V6 extends ({required a: self::G>, required b: core::int}) = dynamic, V7 extends ({required a: self::G, required b: core::int}) = dynamic, V8 extends ({required a: self::G, required b: core::int}) = dynamic, W1 extends self::H<(self::Class, core::int)> = dynamic, W2 extends self::H = dynamic, W3 extends self::H<(self::Class, core::int)> = dynamic, W4 extends self::H<(self::Class, core::int)> = dynamic, W5 extends self::H<(self::ConcreteClass, core::int)> = dynamic, W6 extends self::H<(self::Class, core::int)> = dynamic, W7 extends self::H<(core::Object, core::int)> = dynamic, W8 extends self::H<(core::int, core::int)> = dynamic> extends core::_Enum /*isEnum*/ { + enum-element static const field self::Enum1, self::G, self::G, self::G, self::G, self::G, self::G, self::G, (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int)> a = #C3; static const field core::List> values = invalid-expression "Expected constant 'Enum1, G, G, G, G, G, G, G, (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int)> {}' to be of type 'Enum1, dynamic, Class, Class, ConcreteClass, Class, dynamic, int, G>, G, G>, G>, G, G>, G, G, (Class, int), (dynamic, int), (Class, int), (Class, int), (ConcreteClass, int), (Class, int), (Object, int), (int, int), ({G> a, int b}), ({G a, int b}), ({G> a, int b}), ({G> a, int b}), ({G a, int b}), ({G> a, int b}), ({G a, int b}), ({G a, int b}), H<(Class, int)>, H, H<(Class, int)>, H<(Class, int)>, H<(ConcreteClass, int)>, H<(Class, int)>, H<(Object, int)>, H<(int, int)>>', but was of type 'Enum1, G, G, G, G, G, G, G, (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int)>'. - 'Enum1' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. - 'ConcreteClass' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. @@ -1885,7 +1886,6 @@ class Enum1 = dynamic, T2 extends dynamic, T3 ex - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. - 'Object' is from 'dart:core'. - 'H' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'."; - enum-element static const field self::Enum1, self::G, self::G, self::G, self::G, self::G, self::G, self::G, (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int)> a = #C3; const synthetic constructor •(core::int #index, core::String #name) → self::Enum1 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/bounds_type_parameters.dart.strong.modular.expect b/pkg/front_end/testcases/general/bounds_type_parameters.dart.strong.modular.expect index bc83a2ed25bf..e11723dc4d70 100644 --- a/pkg/front_end/testcases/general/bounds_type_parameters.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/bounds_type_parameters.dart.strong.modular.expect @@ -1878,6 +1878,7 @@ class Class2 = dynamic, T2 extends dynamic, T3 e abstract class Mixin1 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic, U1 extends (self::Class, core::int) = dynamic, U2 extends (dynamic, core::int) = dynamic, U3 extends (self::Class, core::int) = dynamic, U4 extends (self::Class, core::int) = dynamic, U5 extends (self::ConcreteClass, core::int) = dynamic, U6 extends (self::Class, core::int) = dynamic, U7 extends (core::Object, core::int) = dynamic, U8 extends (core::int, core::int) = dynamic, V1 extends ({required a: self::G>, required b: core::int}) = dynamic, V2 extends ({required a: self::G, required b: core::int}) = dynamic, V3 extends ({required a: self::G>, required b: core::int}) = dynamic, V4 extends ({required a: self::G>, required b: core::int}) = dynamic, V5 extends ({required a: self::G, required b: core::int}) = dynamic, V6 extends ({required a: self::G>, required b: core::int}) = dynamic, V7 extends ({required a: self::G, required b: core::int}) = dynamic, V8 extends ({required a: self::G, required b: core::int}) = dynamic, W1 extends self::H<(self::Class, core::int)> = dynamic, W2 extends self::H = dynamic, W3 extends self::H<(self::Class, core::int)> = dynamic, W4 extends self::H<(self::Class, core::int)> = dynamic, W5 extends self::H<(self::ConcreteClass, core::int)> = dynamic, W6 extends self::H<(self::Class, core::int)> = dynamic, W7 extends self::H<(core::Object, core::int)> = dynamic, W8 extends self::H<(core::int, core::int)> = dynamic> extends core::Object /*isMixinDeclaration*/ { } class Enum1 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic, U1 extends (self::Class, core::int) = dynamic, U2 extends (dynamic, core::int) = dynamic, U3 extends (self::Class, core::int) = dynamic, U4 extends (self::Class, core::int) = dynamic, U5 extends (self::ConcreteClass, core::int) = dynamic, U6 extends (self::Class, core::int) = dynamic, U7 extends (core::Object, core::int) = dynamic, U8 extends (core::int, core::int) = dynamic, V1 extends ({required a: self::G>, required b: core::int}) = dynamic, V2 extends ({required a: self::G, required b: core::int}) = dynamic, V3 extends ({required a: self::G>, required b: core::int}) = dynamic, V4 extends ({required a: self::G>, required b: core::int}) = dynamic, V5 extends ({required a: self::G, required b: core::int}) = dynamic, V6 extends ({required a: self::G>, required b: core::int}) = dynamic, V7 extends ({required a: self::G, required b: core::int}) = dynamic, V8 extends ({required a: self::G, required b: core::int}) = dynamic, W1 extends self::H<(self::Class, core::int)> = dynamic, W2 extends self::H = dynamic, W3 extends self::H<(self::Class, core::int)> = dynamic, W4 extends self::H<(self::Class, core::int)> = dynamic, W5 extends self::H<(self::ConcreteClass, core::int)> = dynamic, W6 extends self::H<(self::Class, core::int)> = dynamic, W7 extends self::H<(core::Object, core::int)> = dynamic, W8 extends self::H<(core::int, core::int)> = dynamic> extends core::_Enum /*isEnum*/ { + enum-element static const field self::Enum1, self::G, self::G, self::G, self::G, self::G, self::G, self::G, (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int)> a = #C3; static const field core::List> values = invalid-expression "Expected constant 'Enum1, G, G, G, G, G, G, G, (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int)> {}' to be of type 'Enum1, dynamic, Class, Class, ConcreteClass, Class, dynamic, int, G>, G, G>, G>, G, G>, G, G, (Class, int), (dynamic, int), (Class, int), (Class, int), (ConcreteClass, int), (Class, int), (Object, int), (int, int), ({G> a, int b}), ({G a, int b}), ({G> a, int b}), ({G> a, int b}), ({G a, int b}), ({G> a, int b}), ({G a, int b}), ({G a, int b}), H<(Class, int)>, H, H<(Class, int)>, H<(Class, int)>, H<(ConcreteClass, int)>, H<(Class, int)>, H<(Object, int)>, H<(int, int)>>', but was of type 'Enum1, G, G, G, G, G, G, G, (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int)>'. - 'Enum1' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. - 'ConcreteClass' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. @@ -1885,7 +1886,6 @@ class Enum1 = dynamic, T2 extends dynamic, T3 ex - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. - 'Object' is from 'dart:core'. - 'H' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'."; - enum-element static const field self::Enum1, self::G, self::G, self::G, self::G, self::G, self::G, self::G, (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int)> a = #C3; const synthetic constructor •(core::int #index, core::String #name) → self::Enum1 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/bounds_type_parameters.dart.strong.outline.expect b/pkg/front_end/testcases/general/bounds_type_parameters.dart.strong.outline.expect index 24335572a15a..c83938f7823a 100644 --- a/pkg/front_end/testcases/general/bounds_type_parameters.dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/bounds_type_parameters.dart.strong.outline.expect @@ -1628,8 +1628,8 @@ class Class2 = dynamic, T2 extends dynamic, T3 e abstract class Mixin1 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic, U1 extends (self::Class, core::int) = dynamic, U2 extends (dynamic, core::int) = dynamic, U3 extends (self::Class, core::int) = dynamic, U4 extends (self::Class, core::int) = dynamic, U5 extends (self::ConcreteClass, core::int) = dynamic, U6 extends (self::Class, core::int) = dynamic, U7 extends (core::Object, core::int) = dynamic, U8 extends (core::int, core::int) = dynamic, V1 extends ({required a: self::G>, required b: core::int}) = dynamic, V2 extends ({required a: self::G, required b: core::int}) = dynamic, V3 extends ({required a: self::G>, required b: core::int}) = dynamic, V4 extends ({required a: self::G>, required b: core::int}) = dynamic, V5 extends ({required a: self::G, required b: core::int}) = dynamic, V6 extends ({required a: self::G>, required b: core::int}) = dynamic, V7 extends ({required a: self::G, required b: core::int}) = dynamic, V8 extends ({required a: self::G, required b: core::int}) = dynamic, W1 extends self::H<(self::Class, core::int)> = dynamic, W2 extends self::H = dynamic, W3 extends self::H<(self::Class, core::int)> = dynamic, W4 extends self::H<(self::Class, core::int)> = dynamic, W5 extends self::H<(self::ConcreteClass, core::int)> = dynamic, W6 extends self::H<(self::Class, core::int)> = dynamic, W7 extends self::H<(core::Object, core::int)> = dynamic, W8 extends self::H<(core::int, core::int)> = dynamic> extends core::Object /*isMixinDeclaration*/ { } class Enum1 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic, U1 extends (self::Class, core::int) = dynamic, U2 extends (dynamic, core::int) = dynamic, U3 extends (self::Class, core::int) = dynamic, U4 extends (self::Class, core::int) = dynamic, U5 extends (self::ConcreteClass, core::int) = dynamic, U6 extends (self::Class, core::int) = dynamic, U7 extends (core::Object, core::int) = dynamic, U8 extends (core::int, core::int) = dynamic, V1 extends ({required a: self::G>, required b: core::int}) = dynamic, V2 extends ({required a: self::G, required b: core::int}) = dynamic, V3 extends ({required a: self::G>, required b: core::int}) = dynamic, V4 extends ({required a: self::G>, required b: core::int}) = dynamic, V5 extends ({required a: self::G, required b: core::int}) = dynamic, V6 extends ({required a: self::G>, required b: core::int}) = dynamic, V7 extends ({required a: self::G, required b: core::int}) = dynamic, V8 extends ({required a: self::G, required b: core::int}) = dynamic, W1 extends self::H<(self::Class, core::int)> = dynamic, W2 extends self::H = dynamic, W3 extends self::H<(self::Class, core::int)> = dynamic, W4 extends self::H<(self::Class, core::int)> = dynamic, W5 extends self::H<(self::ConcreteClass, core::int)> = dynamic, W6 extends self::H<(self::Class, core::int)> = dynamic, W7 extends self::H<(core::Object, core::int)> = dynamic, W8 extends self::H<(core::int, core::int)> = dynamic> extends core::_Enum /*isEnum*/ { - static const field core::List> values = const , dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, dynamic, core::int, self::G>, self::G, self::G>, self::G>, self::G, self::G>, self::G, self::G, (self::Class, core::int), (dynamic, core::int), (self::Class, core::int), (self::Class, core::int), (self::ConcreteClass, core::int), (self::Class, core::int), (core::Object, core::int), (core::int, core::int), ({required a: self::G>, required b: core::int}), ({required a: self::G, required b: core::int}), ({required a: self::G>, required b: core::int}), ({required a: self::G>, required b: core::int}), ({required a: self::G, required b: core::int}), ({required a: self::G>, required b: core::int}), ({required a: self::G, required b: core::int}), ({required a: self::G, required b: core::int}), self::H<(self::Class, core::int)>, self::H, self::H<(self::Class, core::int)>, self::H<(self::Class, core::int)>, self::H<(self::ConcreteClass, core::int)>, self::H<(self::Class, core::int)>, self::H<(core::Object, core::int)>, self::H<(core::int, core::int)>>>[self::Enum1::a]; enum-element static const field self::Enum1, self::G, self::G, self::G, self::G, self::G, self::G, self::G, (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int)> a = const self::Enum1::•, self::G, self::G, self::G, self::G, self::G, self::G, self::G, (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int)>(0, "a"); + static const field core::List> values = const , dynamic, self::Class, self::Class, self::ConcreteClass, self::Class, dynamic, core::int, self::G>, self::G, self::G>, self::G>, self::G, self::G>, self::G, self::G, (self::Class, core::int), (dynamic, core::int), (self::Class, core::int), (self::Class, core::int), (self::ConcreteClass, core::int), (self::Class, core::int), (core::Object, core::int), (core::int, core::int), ({required a: self::G>, required b: core::int}), ({required a: self::G, required b: core::int}), ({required a: self::G>, required b: core::int}), ({required a: self::G>, required b: core::int}), ({required a: self::G, required b: core::int}), ({required a: self::G>, required b: core::int}), ({required a: self::G, required b: core::int}), ({required a: self::G, required b: core::int}), self::H<(self::Class, core::int)>, self::H, self::H<(self::Class, core::int)>, self::H<(self::Class, core::int)>, self::H<(self::ConcreteClass, core::int)>, self::H<(self::Class, core::int)>, self::H<(core::Object, core::int)>, self::H<(core::int, core::int)>>>[self::Enum1::a]; const synthetic constructor •(core::int #index, core::String #name) → self::Enum1 : super core::_Enum::•(#index, #name) ; @@ -1647,6 +1647,6 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: StaticGet @ org-dartlang-testcase:///bounds_type_parameters.dart:275:6 -> InstanceConstant(const Enum1, G, G, G, G, G, G, G, (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int)>{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///bounds_type_parameters.dart:317:3 -> InstanceConstant(const Enum1, G, G, G, G, G, G, G, (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int)>{_Enum.index: 0, _Enum._name: "a"}) +Evaluated: StaticGet @ org-dartlang-testcase:///bounds_type_parameters.dart:275:6 -> InstanceConstant(const Enum1, G, G, G, G, G, G, G, (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int)>{_Enum.index: 0, _Enum._name: "a"}) Extra constant evaluation: evaluated: 8, effectively constant: 2 diff --git a/pkg/front_end/testcases/general/bounds_type_parameters.dart.strong.transformed.expect b/pkg/front_end/testcases/general/bounds_type_parameters.dart.strong.transformed.expect index 5ee7f0e49fab..10c36c6b8ccf 100644 --- a/pkg/front_end/testcases/general/bounds_type_parameters.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/bounds_type_parameters.dart.strong.transformed.expect @@ -1878,6 +1878,7 @@ class Class2 = dynamic, T2 extends dynamic, T3 e abstract class Mixin1 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic, U1 extends (self::Class, core::int) = dynamic, U2 extends (dynamic, core::int) = dynamic, U3 extends (self::Class, core::int) = dynamic, U4 extends (self::Class, core::int) = dynamic, U5 extends (self::ConcreteClass, core::int) = dynamic, U6 extends (self::Class, core::int) = dynamic, U7 extends (core::Object, core::int) = dynamic, U8 extends (core::int, core::int) = dynamic, V1 extends ({required a: self::G>, required b: core::int}) = dynamic, V2 extends ({required a: self::G, required b: core::int}) = dynamic, V3 extends ({required a: self::G>, required b: core::int}) = dynamic, V4 extends ({required a: self::G>, required b: core::int}) = dynamic, V5 extends ({required a: self::G, required b: core::int}) = dynamic, V6 extends ({required a: self::G>, required b: core::int}) = dynamic, V7 extends ({required a: self::G, required b: core::int}) = dynamic, V8 extends ({required a: self::G, required b: core::int}) = dynamic, W1 extends self::H<(self::Class, core::int)> = dynamic, W2 extends self::H = dynamic, W3 extends self::H<(self::Class, core::int)> = dynamic, W4 extends self::H<(self::Class, core::int)> = dynamic, W5 extends self::H<(self::ConcreteClass, core::int)> = dynamic, W6 extends self::H<(self::Class, core::int)> = dynamic, W7 extends self::H<(core::Object, core::int)> = dynamic, W8 extends self::H<(core::int, core::int)> = dynamic> extends core::Object /*isMixinDeclaration*/ { } class Enum1 = dynamic, T2 extends dynamic, T3 extends self::Class = dynamic, T4 extends self::Class = dynamic, T5 extends self::ConcreteClass = dynamic, T6 extends self::Class = dynamic, T7 extends core::Object = dynamic, T8 extends core::int = dynamic, S1 extends self::G> = dynamic, S2 extends self::G = dynamic, S3 extends self::G> = dynamic, S4 extends self::G> = dynamic, S5 extends self::G = dynamic, S6 extends self::G> = dynamic, S7 extends self::G = dynamic, S8 extends self::G = dynamic, U1 extends (self::Class, core::int) = dynamic, U2 extends (dynamic, core::int) = dynamic, U3 extends (self::Class, core::int) = dynamic, U4 extends (self::Class, core::int) = dynamic, U5 extends (self::ConcreteClass, core::int) = dynamic, U6 extends (self::Class, core::int) = dynamic, U7 extends (core::Object, core::int) = dynamic, U8 extends (core::int, core::int) = dynamic, V1 extends ({required a: self::G>, required b: core::int}) = dynamic, V2 extends ({required a: self::G, required b: core::int}) = dynamic, V3 extends ({required a: self::G>, required b: core::int}) = dynamic, V4 extends ({required a: self::G>, required b: core::int}) = dynamic, V5 extends ({required a: self::G, required b: core::int}) = dynamic, V6 extends ({required a: self::G>, required b: core::int}) = dynamic, V7 extends ({required a: self::G, required b: core::int}) = dynamic, V8 extends ({required a: self::G, required b: core::int}) = dynamic, W1 extends self::H<(self::Class, core::int)> = dynamic, W2 extends self::H = dynamic, W3 extends self::H<(self::Class, core::int)> = dynamic, W4 extends self::H<(self::Class, core::int)> = dynamic, W5 extends self::H<(self::ConcreteClass, core::int)> = dynamic, W6 extends self::H<(self::Class, core::int)> = dynamic, W7 extends self::H<(core::Object, core::int)> = dynamic, W8 extends self::H<(core::int, core::int)> = dynamic> extends core::_Enum /*isEnum*/ { + enum-element static const field self::Enum1, self::G, self::G, self::G, self::G, self::G, self::G, self::G, (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int)> a = #C3; static const field core::List> values = invalid-expression "Expected constant 'Enum1, G, G, G, G, G, G, G, (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int)> {}' to be of type 'Enum1, dynamic, Class, Class, ConcreteClass, Class, dynamic, int, G>, G, G>, G>, G, G>, G, G, (Class, int), (dynamic, int), (Class, int), (Class, int), (ConcreteClass, int), (Class, int), (Object, int), (int, int), ({G> a, int b}), ({G a, int b}), ({G> a, int b}), ({G> a, int b}), ({G a, int b}), ({G> a, int b}), ({G a, int b}), ({G a, int b}), H<(Class, int)>, H, H<(Class, int)>, H<(Class, int)>, H<(ConcreteClass, int)>, H<(Class, int)>, H<(Object, int)>, H<(int, int)>>', but was of type 'Enum1, G, G, G, G, G, G, G, (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), ({ConcreteClass a, int b}), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int), (ConcreteClass, int)>'. - 'Enum1' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. - 'ConcreteClass' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. @@ -1885,7 +1886,6 @@ class Enum1 = dynamic, T2 extends dynamic, T3 ex - 'Class' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'. - 'Object' is from 'dart:core'. - 'H' is from 'pkg/front_end/testcases/general/bounds_type_parameters.dart'."; - enum-element static const field self::Enum1, self::G, self::G, self::G, self::G, self::G, self::G, self::G, (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), ({required a: self::ConcreteClass, required b: core::int}), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int), (self::ConcreteClass, core::int)> a = #C3; const synthetic constructor •(core::int #index, core::String #name) → self::Enum1 : super core::_Enum::•(#index, #name) ; 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 590a7fc916d7..4aa28fb5165f 100644 --- a/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.expect +++ b/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.expect @@ -242,20 +242,22 @@ library; // static s() { // ^ // -// pkg/front_end/testcases/general/duplicated_declarations.dart:70:4: Error: Name of enum constant 'Enum' can't be the same as the enum's own name. -// Sub() : super(null); -// ^^^^ +// pkg/front_end/testcases/general/duplicated_declarations_part.dart:76:3: Error: A class member can't have the same name as the enclosing class. +// Try renaming the member. +// Enum, +// ^ // -// pkg/front_end/testcases/general/duplicated_declarations.dart:70:17: Error: 'a' is already declared in this scope. -// Sub() : super(null); -// ^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:70:12: Context: Previous declaration of 'a'. -// Sub() : super(null); -// ^ +// pkg/front_end/testcases/general/duplicated_declarations_part.dart:78:3: Error: 'a' is already declared in this scope. +// a, +// ^ +// pkg/front_end/testcases/general/duplicated_declarations_part.dart:77:3: Context: Previous declaration of 'a'. +// a, +// ^ // -// pkg/front_end/testcases/general/duplicated_declarations.dart:79:3: Error: Name of enum constant 'Enum' can't be the same as the enum's own name. +// pkg/front_end/testcases/general/duplicated_declarations.dart:79:3: Error: A class member can't have the same name as the enclosing class. +// Try renaming the member. // Enum, -// ^^^^ +// ^ // // pkg/front_end/testcases/general/duplicated_declarations.dart:81:3: Error: 'a' is already declared in this scope. // a, @@ -264,12 +266,9 @@ library; // a, // ^ // -// pkg/front_end/testcases/general/duplicated_declarations.dart:98:3: Error: 'values' is already declared in this scope. +// pkg/front_end/testcases/general/duplicated_declarations.dart:98:3: Error: An enum can't declare a member named 'values'. // values, // ^^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:91:6: Context: Previous declaration of 'values' is implied by this definition. -// enum AnotherEnum { -// ^^^^^^^^^^^ // // pkg/front_end/testcases/general/duplicated_declarations.dart:9:46: Error: 'Typedef' is already declared in this scope. // import 'duplicated_declarations_lib.dart' as Typedef; @@ -422,8 +421,8 @@ Try removing the extra positional arguments. ^"; } class Enum#4#0 extends core::_Enum /*isEnum*/ { // from org-dartlang-testcase:///duplicated_declarations_part.dart - static const field core::List values = #C4; enum-element static const field self::Enum#4#0 a = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::Enum#4#0 : super core::_Enum::•(#index, #name) ; @@ -431,10 +430,10 @@ class Enum#4#0 extends core::_Enum /*isEnum*/ { // from org-dartlang-testcase:/ return "Enum#4#0.${this.{core::_Enum::_name}{core::String}}"; } class Enum#3#0 extends core::_Enum /*isEnum*/ { // from org-dartlang-testcase:///duplicated_declarations_part.dart - static const field core::List values = #C12; enum-element static const field self::Enum#3#0 a = #C5; enum-element static const field self::Enum#3#0 b = #C8; enum-element static const field self::Enum#3#0 c = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → self::Enum#3#0 : super core::_Enum::•(#index, #name) ; @@ -442,10 +441,10 @@ class Enum#3#0 extends core::_Enum /*isEnum*/ { // from org-dartlang-testcase:/ return "Enum#3#0.${this.{core::_Enum::_name}{core::String}}"; } class Enum#2#0 extends core::_Enum /*isEnum*/ { // from org-dartlang-testcase:///duplicated_declarations_part.dart - static const field core::List values = #C17; enum-element static const field self::Enum#2#0 Enum = #C14; enum-element static const field self::Enum#2#0 a = #C15; enum-element static const field self::Enum#2#0 b = #C16; + static const field core::List values = #C17; const synthetic constructor •(core::int #index, core::String #name) → self::Enum#2#0 : super core::_Enum::•(#index, #name) ; @@ -453,10 +452,10 @@ class Enum#2#0 extends core::_Enum /*isEnum*/ { // from org-dartlang-testcase:/ return "Enum#2#0.${this.{core::_Enum::_name}{core::String}}"; } class Enum#1#0 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C21; enum-element static const field self::Enum#1#0 a = #C18; enum-element static const field self::Enum#1#0 b = #C19; enum-element static const field self::Enum#1#0 c = #C20; + static const field core::List values = #C21; const synthetic constructor •(core::int #index, core::String #name) → self::Enum#1#0 : super core::_Enum::•(#index, #name) ; @@ -464,10 +463,10 @@ class Enum#1#0 extends core::_Enum /*isEnum*/ { return "Enum#1#0.${this.{core::_Enum::_name}{core::String}}"; } class Enum extends core::_Enum /*isEnum*/ { - static const field core::List values = #C25; enum-element static const field self::Enum Enum = #C22; enum-element static const field self::Enum a = #C23; enum-element static const field self::Enum b = #C24; + static const field core::List values = #C25; const synthetic constructor •(core::int #index, core::String #name) → self::Enum : super core::_Enum::•(#index, #name) ; @@ -475,13 +474,13 @@ class Enum extends core::_Enum /*isEnum*/ { return "Enum.${this.{core::_Enum::_name}{core::String}}"; } class AnotherEnum extends core::_Enum /*isEnum*/ { - static const field core::List values = #C38; enum-element static const field self::AnotherEnum a = #C26; enum-element static const field self::AnotherEnum b = #C27; enum-element static const field self::AnotherEnum c = #C28; enum-element static const field self::AnotherEnum _name = #C31; enum-element static const field self::AnotherEnum index = #C34; enum-element static const field self::AnotherEnum toString = #C37; + static const field core::List values = #C38; const synthetic constructor •(core::int #index, core::String #name) → self::AnotherEnum : super core::_Enum::•(#index, #name) ; 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 590a7fc916d7..4aa28fb5165f 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 @@ -242,20 +242,22 @@ library; // static s() { // ^ // -// pkg/front_end/testcases/general/duplicated_declarations.dart:70:4: Error: Name of enum constant 'Enum' can't be the same as the enum's own name. -// Sub() : super(null); -// ^^^^ +// pkg/front_end/testcases/general/duplicated_declarations_part.dart:76:3: Error: A class member can't have the same name as the enclosing class. +// Try renaming the member. +// Enum, +// ^ // -// pkg/front_end/testcases/general/duplicated_declarations.dart:70:17: Error: 'a' is already declared in this scope. -// Sub() : super(null); -// ^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:70:12: Context: Previous declaration of 'a'. -// Sub() : super(null); -// ^ +// pkg/front_end/testcases/general/duplicated_declarations_part.dart:78:3: Error: 'a' is already declared in this scope. +// a, +// ^ +// pkg/front_end/testcases/general/duplicated_declarations_part.dart:77:3: Context: Previous declaration of 'a'. +// a, +// ^ // -// pkg/front_end/testcases/general/duplicated_declarations.dart:79:3: Error: Name of enum constant 'Enum' can't be the same as the enum's own name. +// pkg/front_end/testcases/general/duplicated_declarations.dart:79:3: Error: A class member can't have the same name as the enclosing class. +// Try renaming the member. // Enum, -// ^^^^ +// ^ // // pkg/front_end/testcases/general/duplicated_declarations.dart:81:3: Error: 'a' is already declared in this scope. // a, @@ -264,12 +266,9 @@ library; // a, // ^ // -// pkg/front_end/testcases/general/duplicated_declarations.dart:98:3: Error: 'values' is already declared in this scope. +// pkg/front_end/testcases/general/duplicated_declarations.dart:98:3: Error: An enum can't declare a member named 'values'. // values, // ^^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:91:6: Context: Previous declaration of 'values' is implied by this definition. -// enum AnotherEnum { -// ^^^^^^^^^^^ // // pkg/front_end/testcases/general/duplicated_declarations.dart:9:46: Error: 'Typedef' is already declared in this scope. // import 'duplicated_declarations_lib.dart' as Typedef; @@ -422,8 +421,8 @@ Try removing the extra positional arguments. ^"; } class Enum#4#0 extends core::_Enum /*isEnum*/ { // from org-dartlang-testcase:///duplicated_declarations_part.dart - static const field core::List values = #C4; enum-element static const field self::Enum#4#0 a = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::Enum#4#0 : super core::_Enum::•(#index, #name) ; @@ -431,10 +430,10 @@ class Enum#4#0 extends core::_Enum /*isEnum*/ { // from org-dartlang-testcase:/ return "Enum#4#0.${this.{core::_Enum::_name}{core::String}}"; } class Enum#3#0 extends core::_Enum /*isEnum*/ { // from org-dartlang-testcase:///duplicated_declarations_part.dart - static const field core::List values = #C12; enum-element static const field self::Enum#3#0 a = #C5; enum-element static const field self::Enum#3#0 b = #C8; enum-element static const field self::Enum#3#0 c = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → self::Enum#3#0 : super core::_Enum::•(#index, #name) ; @@ -442,10 +441,10 @@ class Enum#3#0 extends core::_Enum /*isEnum*/ { // from org-dartlang-testcase:/ return "Enum#3#0.${this.{core::_Enum::_name}{core::String}}"; } class Enum#2#0 extends core::_Enum /*isEnum*/ { // from org-dartlang-testcase:///duplicated_declarations_part.dart - static const field core::List values = #C17; enum-element static const field self::Enum#2#0 Enum = #C14; enum-element static const field self::Enum#2#0 a = #C15; enum-element static const field self::Enum#2#0 b = #C16; + static const field core::List values = #C17; const synthetic constructor •(core::int #index, core::String #name) → self::Enum#2#0 : super core::_Enum::•(#index, #name) ; @@ -453,10 +452,10 @@ class Enum#2#0 extends core::_Enum /*isEnum*/ { // from org-dartlang-testcase:/ return "Enum#2#0.${this.{core::_Enum::_name}{core::String}}"; } class Enum#1#0 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C21; enum-element static const field self::Enum#1#0 a = #C18; enum-element static const field self::Enum#1#0 b = #C19; enum-element static const field self::Enum#1#0 c = #C20; + static const field core::List values = #C21; const synthetic constructor •(core::int #index, core::String #name) → self::Enum#1#0 : super core::_Enum::•(#index, #name) ; @@ -464,10 +463,10 @@ class Enum#1#0 extends core::_Enum /*isEnum*/ { return "Enum#1#0.${this.{core::_Enum::_name}{core::String}}"; } class Enum extends core::_Enum /*isEnum*/ { - static const field core::List values = #C25; enum-element static const field self::Enum Enum = #C22; enum-element static const field self::Enum a = #C23; enum-element static const field self::Enum b = #C24; + static const field core::List values = #C25; const synthetic constructor •(core::int #index, core::String #name) → self::Enum : super core::_Enum::•(#index, #name) ; @@ -475,13 +474,13 @@ class Enum extends core::_Enum /*isEnum*/ { return "Enum.${this.{core::_Enum::_name}{core::String}}"; } class AnotherEnum extends core::_Enum /*isEnum*/ { - static const field core::List values = #C38; enum-element static const field self::AnotherEnum a = #C26; enum-element static const field self::AnotherEnum b = #C27; enum-element static const field self::AnotherEnum c = #C28; enum-element static const field self::AnotherEnum _name = #C31; enum-element static const field self::AnotherEnum index = #C34; enum-element static const field self::AnotherEnum toString = #C37; + static const field core::List values = #C38; const synthetic constructor •(core::int #index, core::String #name) → self::AnotherEnum : super core::_Enum::•(#index, #name) ; 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 2a6649c27cb9..10e41e202064 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 @@ -242,20 +242,22 @@ library; // static s() { // ^ // -// pkg/front_end/testcases/general/duplicated_declarations.dart:70:4: Error: Name of enum constant 'Enum' can't be the same as the enum's own name. -// Sub() : super(null); -// ^^^^ -// -// pkg/front_end/testcases/general/duplicated_declarations.dart:70:17: Error: 'a' is already declared in this scope. -// Sub() : super(null); -// ^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:70:12: Context: Previous declaration of 'a'. -// Sub() : super(null); -// ^ -// -// pkg/front_end/testcases/general/duplicated_declarations.dart:79:3: Error: Name of enum constant 'Enum' can't be the same as the enum's own name. +// pkg/front_end/testcases/general/duplicated_declarations_part.dart:76:3: Error: A class member can't have the same name as the enclosing class. +// Try renaming the member. // Enum, -// ^^^^ +// ^ +// +// pkg/front_end/testcases/general/duplicated_declarations_part.dart:78:3: Error: 'a' is already declared in this scope. +// a, +// ^ +// pkg/front_end/testcases/general/duplicated_declarations_part.dart:77:3: Context: Previous declaration of 'a'. +// a, +// ^ +// +// pkg/front_end/testcases/general/duplicated_declarations.dart:79:3: Error: A class member can't have the same name as the enclosing class. +// Try renaming the member. +// Enum, +// ^ // // pkg/front_end/testcases/general/duplicated_declarations.dart:81:3: Error: 'a' is already declared in this scope. // a, @@ -264,12 +266,9 @@ library; // a, // ^ // -// pkg/front_end/testcases/general/duplicated_declarations.dart:98:3: Error: 'values' is already declared in this scope. +// pkg/front_end/testcases/general/duplicated_declarations.dart:98:3: Error: An enum can't declare a member named 'values'. // values, // ^^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:91:6: Context: Previous declaration of 'values' is implied by this definition. -// enum AnotherEnum { -// ^^^^^^^^^^^ // // pkg/front_end/testcases/general/duplicated_declarations.dart:9:46: Error: 'Typedef' is already declared in this scope. // import 'duplicated_declarations_lib.dart' as Typedef; @@ -353,8 +352,8 @@ class Sub extends core::Object { ; } class Enum#4#0 extends core::_Enum /*isEnum*/ { // from org-dartlang-testcase:///duplicated_declarations_part.dart - static const field core::List values = const [self::Enum#4#0::a]; enum-element static const field self::Enum#4#0 a = const self::Enum#4#0::•(0, "a"); + static const field core::List values = const [self::Enum#4#0::a]; const synthetic constructor •(core::int #index, core::String #name) → self::Enum#4#0 : super core::_Enum::•(#index, #name) ; @@ -362,10 +361,10 @@ class Enum#4#0 extends core::_Enum /*isEnum*/ { // from org-dartlang-testcase:/ return "Enum#4#0.${this.{core::_Enum::_name}{core::String}}"; } class Enum#3#0 extends core::_Enum /*isEnum*/ { // from org-dartlang-testcase:///duplicated_declarations_part.dart - static const field core::List values = const [self::Enum#3#0::a, self::Enum#3#0::b, self::Enum#3#0::c]; enum-element static const field self::Enum#3#0 a = const self::Enum#3#0::•(0, "a"); enum-element static const field self::Enum#3#0 b = const self::Enum#3#0::•(1, "b"); enum-element static const field self::Enum#3#0 c = const self::Enum#3#0::•(2, "c"); + static const field core::List values = const [self::Enum#3#0::a, self::Enum#3#0::b, self::Enum#3#0::c]; const synthetic constructor •(core::int #index, core::String #name) → self::Enum#3#0 : super core::_Enum::•(#index, #name) ; @@ -373,10 +372,10 @@ class Enum#3#0 extends core::_Enum /*isEnum*/ { // from org-dartlang-testcase:/ return "Enum#3#0.${this.{core::_Enum::_name}{core::String}}"; } class Enum#2#0 extends core::_Enum /*isEnum*/ { // from org-dartlang-testcase:///duplicated_declarations_part.dart - static const field core::List values = const [self::Enum#2#0::Enum, self::Enum#2#0::a, self::Enum#2#0::b]; enum-element static const field self::Enum#2#0 Enum = const self::Enum#2#0::•(0, "Enum"); enum-element static const field self::Enum#2#0 a = const self::Enum#2#0::•(1, "a"); enum-element static const field self::Enum#2#0 b = const self::Enum#2#0::•(2, "b"); + static const field core::List values = const [self::Enum#2#0::Enum, self::Enum#2#0::a, self::Enum#2#0::b]; const synthetic constructor •(core::int #index, core::String #name) → self::Enum#2#0 : super core::_Enum::•(#index, #name) ; @@ -384,10 +383,10 @@ class Enum#2#0 extends core::_Enum /*isEnum*/ { // from org-dartlang-testcase:/ return "Enum#2#0.${this.{core::_Enum::_name}{core::String}}"; } class Enum#1#0 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::Enum#1#0::a, self::Enum#1#0::b, self::Enum#1#0::c]; enum-element static const field self::Enum#1#0 a = const self::Enum#1#0::•(0, "a"); enum-element static const field self::Enum#1#0 b = const self::Enum#1#0::•(1, "b"); enum-element static const field self::Enum#1#0 c = const self::Enum#1#0::•(2, "c"); + static const field core::List values = const [self::Enum#1#0::a, self::Enum#1#0::b, self::Enum#1#0::c]; const synthetic constructor •(core::int #index, core::String #name) → self::Enum#1#0 : super core::_Enum::•(#index, #name) ; @@ -395,10 +394,10 @@ class Enum#1#0 extends core::_Enum /*isEnum*/ { return "Enum#1#0.${this.{core::_Enum::_name}{core::String}}"; } class Enum extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::Enum::Enum, self::Enum::a, self::Enum::b]; enum-element static const field self::Enum Enum = const self::Enum::•(0, "Enum"); enum-element static const field self::Enum a = const self::Enum::•(1, "a"); enum-element static const field self::Enum b = const self::Enum::•(2, "b"); + static const field core::List values = const [self::Enum::Enum, self::Enum::a, self::Enum::b]; const synthetic constructor •(core::int #index, core::String #name) → self::Enum : super core::_Enum::•(#index, #name) ; @@ -406,13 +405,13 @@ class Enum extends core::_Enum /*isEnum*/ { return "Enum.${this.{core::_Enum::_name}{core::String}}"; } class AnotherEnum extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::AnotherEnum::a, self::AnotherEnum::b, self::AnotherEnum::c, self::AnotherEnum::_name, self::AnotherEnum::index, self::AnotherEnum::toString]; enum-element static const field self::AnotherEnum a = const self::AnotherEnum::•(0, "a"); enum-element static const field self::AnotherEnum b = const self::AnotherEnum::•(1, "b"); enum-element static const field self::AnotherEnum c = const self::AnotherEnum::•(2, "c"); enum-element static const field self::AnotherEnum _name = const self::AnotherEnum::•(3, "_name"); enum-element static const field self::AnotherEnum index = const self::AnotherEnum::•(4, "index"); enum-element static const field self::AnotherEnum toString = const self::AnotherEnum::•(5, "toString"); + static const field core::List values = const [self::AnotherEnum::a, self::AnotherEnum::b, self::AnotherEnum::c, self::AnotherEnum::_name, self::AnotherEnum::index, self::AnotherEnum::toString]; const synthetic constructor •(core::int #index, core::String #name) → self::AnotherEnum : super core::_Enum::•(#index, #name) ; @@ -433,29 +432,29 @@ import self as self2; Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///duplicated_declarations_part.dart:88:6 -> ListConstant(const [const Enum#4#0{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations_part.dart:89:3 -> InstanceConstant(const Enum#4#0{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///duplicated_declarations_part.dart:82:6 -> ListConstant(const [const Enum#3#0{_Enum.index: 0, _Enum._name: "a"}, const Enum#3#0{_Enum.index: 1, _Enum._name: "b"}, const Enum#3#0{_Enum.index: 2, _Enum._name: "c"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///duplicated_declarations_part.dart:88:6 -> ListConstant(const [const Enum#4#0{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations_part.dart:83:3 -> InstanceConstant(const Enum#3#0{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations_part.dart:84:3 -> InstanceConstant(const Enum#3#0{_Enum.index: 1, _Enum._name: "b"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations_part.dart:85:3 -> InstanceConstant(const Enum#3#0{_Enum.index: 2, _Enum._name: "c"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///duplicated_declarations_part.dart:75:6 -> ListConstant(const [const Enum#2#0{_Enum.index: 0, _Enum._name: "Enum"}, const Enum#2#0{_Enum.index: 1, _Enum._name: "a"}, const Enum#2#0{_Enum.index: 2, _Enum._name: "b"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///duplicated_declarations_part.dart:82:6 -> ListConstant(const [const Enum#3#0{_Enum.index: 0, _Enum._name: "a"}, const Enum#3#0{_Enum.index: 1, _Enum._name: "b"}, const Enum#3#0{_Enum.index: 2, _Enum._name: "c"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations_part.dart:76:3 -> InstanceConstant(const Enum#2#0{_Enum.index: 0, _Enum._name: "Enum"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations_part.dart:77:3 -> InstanceConstant(const Enum#2#0{_Enum.index: 1, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations_part.dart:79:3 -> InstanceConstant(const Enum#2#0{_Enum.index: 2, _Enum._name: "b"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///duplicated_declarations.dart:85:6 -> ListConstant(const [const Enum#1#0{_Enum.index: 0, _Enum._name: "a"}, const Enum#1#0{_Enum.index: 1, _Enum._name: "b"}, const Enum#1#0{_Enum.index: 2, _Enum._name: "c"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///duplicated_declarations_part.dart:75:6 -> ListConstant(const [const Enum#2#0{_Enum.index: 0, _Enum._name: "Enum"}, const Enum#2#0{_Enum.index: 1, _Enum._name: "a"}, const Enum#2#0{_Enum.index: 2, _Enum._name: "b"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:86:3 -> InstanceConstant(const Enum#1#0{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:87:3 -> InstanceConstant(const Enum#1#0{_Enum.index: 1, _Enum._name: "b"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:88:3 -> InstanceConstant(const Enum#1#0{_Enum.index: 2, _Enum._name: "c"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///duplicated_declarations.dart:78:6 -> ListConstant(const [const Enum{_Enum.index: 0, _Enum._name: "Enum"}, const Enum{_Enum.index: 1, _Enum._name: "a"}, const Enum{_Enum.index: 2, _Enum._name: "b"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///duplicated_declarations.dart:85:6 -> ListConstant(const [const Enum#1#0{_Enum.index: 0, _Enum._name: "a"}, const Enum#1#0{_Enum.index: 1, _Enum._name: "b"}, const Enum#1#0{_Enum.index: 2, _Enum._name: "c"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:79:3 -> InstanceConstant(const Enum{_Enum.index: 0, _Enum._name: "Enum"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:80:3 -> InstanceConstant(const Enum{_Enum.index: 1, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:82:3 -> InstanceConstant(const Enum{_Enum.index: 2, _Enum._name: "b"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///duplicated_declarations.dart:91:6 -> ListConstant(const [const AnotherEnum{_Enum.index: 0, _Enum._name: "a"}, const AnotherEnum{_Enum.index: 1, _Enum._name: "b"}, const AnotherEnum{_Enum.index: 2, _Enum._name: "c"}, const AnotherEnum{_Enum.index: 3, _Enum._name: "_name"}, const AnotherEnum{_Enum.index: 4, _Enum._name: "index"}, const AnotherEnum{_Enum.index: 5, _Enum._name: "toString"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///duplicated_declarations.dart:78:6 -> ListConstant(const [const Enum{_Enum.index: 0, _Enum._name: "Enum"}, const Enum{_Enum.index: 1, _Enum._name: "a"}, const Enum{_Enum.index: 2, _Enum._name: "b"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:92:3 -> InstanceConstant(const AnotherEnum{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:93:3 -> InstanceConstant(const AnotherEnum{_Enum.index: 1, _Enum._name: "b"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:94:3 -> InstanceConstant(const AnotherEnum{_Enum.index: 2, _Enum._name: "c"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:95:3 -> InstanceConstant(const AnotherEnum{_Enum.index: 3, _Enum._name: "_name"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:96:3 -> InstanceConstant(const AnotherEnum{_Enum.index: 4, _Enum._name: "index"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicated_declarations.dart:97:3 -> InstanceConstant(const AnotherEnum{_Enum.index: 5, _Enum._name: "toString"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///duplicated_declarations.dart:91:6 -> ListConstant(const [const AnotherEnum{_Enum.index: 0, _Enum._name: "a"}, const AnotherEnum{_Enum.index: 1, _Enum._name: "b"}, const AnotherEnum{_Enum.index: 2, _Enum._name: "c"}, const AnotherEnum{_Enum.index: 3, _Enum._name: "_name"}, const AnotherEnum{_Enum.index: 4, _Enum._name: "index"}, const AnotherEnum{_Enum.index: 5, _Enum._name: "toString"}]) Extra constant evaluation: evaluated: 55, effectively constant: 25 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 590a7fc916d7..4aa28fb5165f 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 @@ -242,20 +242,22 @@ library; // static s() { // ^ // -// pkg/front_end/testcases/general/duplicated_declarations.dart:70:4: Error: Name of enum constant 'Enum' can't be the same as the enum's own name. -// Sub() : super(null); -// ^^^^ +// pkg/front_end/testcases/general/duplicated_declarations_part.dart:76:3: Error: A class member can't have the same name as the enclosing class. +// Try renaming the member. +// Enum, +// ^ // -// pkg/front_end/testcases/general/duplicated_declarations.dart:70:17: Error: 'a' is already declared in this scope. -// Sub() : super(null); -// ^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:70:12: Context: Previous declaration of 'a'. -// Sub() : super(null); -// ^ +// pkg/front_end/testcases/general/duplicated_declarations_part.dart:78:3: Error: 'a' is already declared in this scope. +// a, +// ^ +// pkg/front_end/testcases/general/duplicated_declarations_part.dart:77:3: Context: Previous declaration of 'a'. +// a, +// ^ // -// pkg/front_end/testcases/general/duplicated_declarations.dart:79:3: Error: Name of enum constant 'Enum' can't be the same as the enum's own name. +// pkg/front_end/testcases/general/duplicated_declarations.dart:79:3: Error: A class member can't have the same name as the enclosing class. +// Try renaming the member. // Enum, -// ^^^^ +// ^ // // pkg/front_end/testcases/general/duplicated_declarations.dart:81:3: Error: 'a' is already declared in this scope. // a, @@ -264,12 +266,9 @@ library; // a, // ^ // -// pkg/front_end/testcases/general/duplicated_declarations.dart:98:3: Error: 'values' is already declared in this scope. +// pkg/front_end/testcases/general/duplicated_declarations.dart:98:3: Error: An enum can't declare a member named 'values'. // values, // ^^^^^^ -// pkg/front_end/testcases/general/duplicated_declarations.dart:91:6: Context: Previous declaration of 'values' is implied by this definition. -// enum AnotherEnum { -// ^^^^^^^^^^^ // // pkg/front_end/testcases/general/duplicated_declarations.dart:9:46: Error: 'Typedef' is already declared in this scope. // import 'duplicated_declarations_lib.dart' as Typedef; @@ -422,8 +421,8 @@ Try removing the extra positional arguments. ^"; } class Enum#4#0 extends core::_Enum /*isEnum*/ { // from org-dartlang-testcase:///duplicated_declarations_part.dart - static const field core::List values = #C4; enum-element static const field self::Enum#4#0 a = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::Enum#4#0 : super core::_Enum::•(#index, #name) ; @@ -431,10 +430,10 @@ class Enum#4#0 extends core::_Enum /*isEnum*/ { // from org-dartlang-testcase:/ return "Enum#4#0.${this.{core::_Enum::_name}{core::String}}"; } class Enum#3#0 extends core::_Enum /*isEnum*/ { // from org-dartlang-testcase:///duplicated_declarations_part.dart - static const field core::List values = #C12; enum-element static const field self::Enum#3#0 a = #C5; enum-element static const field self::Enum#3#0 b = #C8; enum-element static const field self::Enum#3#0 c = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → self::Enum#3#0 : super core::_Enum::•(#index, #name) ; @@ -442,10 +441,10 @@ class Enum#3#0 extends core::_Enum /*isEnum*/ { // from org-dartlang-testcase:/ return "Enum#3#0.${this.{core::_Enum::_name}{core::String}}"; } class Enum#2#0 extends core::_Enum /*isEnum*/ { // from org-dartlang-testcase:///duplicated_declarations_part.dart - static const field core::List values = #C17; enum-element static const field self::Enum#2#0 Enum = #C14; enum-element static const field self::Enum#2#0 a = #C15; enum-element static const field self::Enum#2#0 b = #C16; + static const field core::List values = #C17; const synthetic constructor •(core::int #index, core::String #name) → self::Enum#2#0 : super core::_Enum::•(#index, #name) ; @@ -453,10 +452,10 @@ class Enum#2#0 extends core::_Enum /*isEnum*/ { // from org-dartlang-testcase:/ return "Enum#2#0.${this.{core::_Enum::_name}{core::String}}"; } class Enum#1#0 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C21; enum-element static const field self::Enum#1#0 a = #C18; enum-element static const field self::Enum#1#0 b = #C19; enum-element static const field self::Enum#1#0 c = #C20; + static const field core::List values = #C21; const synthetic constructor •(core::int #index, core::String #name) → self::Enum#1#0 : super core::_Enum::•(#index, #name) ; @@ -464,10 +463,10 @@ class Enum#1#0 extends core::_Enum /*isEnum*/ { return "Enum#1#0.${this.{core::_Enum::_name}{core::String}}"; } class Enum extends core::_Enum /*isEnum*/ { - static const field core::List values = #C25; enum-element static const field self::Enum Enum = #C22; enum-element static const field self::Enum a = #C23; enum-element static const field self::Enum b = #C24; + static const field core::List values = #C25; const synthetic constructor •(core::int #index, core::String #name) → self::Enum : super core::_Enum::•(#index, #name) ; @@ -475,13 +474,13 @@ class Enum extends core::_Enum /*isEnum*/ { return "Enum.${this.{core::_Enum::_name}{core::String}}"; } class AnotherEnum extends core::_Enum /*isEnum*/ { - static const field core::List values = #C38; enum-element static const field self::AnotherEnum a = #C26; enum-element static const field self::AnotherEnum b = #C27; enum-element static const field self::AnotherEnum c = #C28; enum-element static const field self::AnotherEnum _name = #C31; enum-element static const field self::AnotherEnum index = #C34; enum-element static const field self::AnotherEnum toString = #C37; + static const field core::List values = #C38; const synthetic constructor •(core::int #index, core::String #name) → self::AnotherEnum : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/enum_names_from_core.dart.strong.expect b/pkg/front_end/testcases/general/enum_names_from_core.dart.strong.expect index 16db4a42cbf4..23c2db7126ca 100644 --- a/pkg/front_end/testcases/general/enum_names_from_core.dart.strong.expect +++ b/pkg/front_end/testcases/general/enum_names_from_core.dart.strong.expect @@ -28,12 +28,12 @@ class List extends core::Object { ; } class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field self::E int = #C3; enum-element static const field self::E Object = #C6; enum-element static const field self::E String = #C9; enum-element static const field self::E _Enum = #C12; enum-element static const field self::E List = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/enum_names_from_core.dart.strong.modular.expect b/pkg/front_end/testcases/general/enum_names_from_core.dart.strong.modular.expect index 16db4a42cbf4..23c2db7126ca 100644 --- a/pkg/front_end/testcases/general/enum_names_from_core.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/enum_names_from_core.dart.strong.modular.expect @@ -28,12 +28,12 @@ class List extends core::Object { ; } class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field self::E int = #C3; enum-element static const field self::E Object = #C6; enum-element static const field self::E String = #C9; enum-element static const field self::E _Enum = #C12; enum-element static const field self::E List = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/enum_names_from_core.dart.strong.outline.expect b/pkg/front_end/testcases/general/enum_names_from_core.dart.strong.outline.expect index 1259d3fee298..10d38353dd85 100644 --- a/pkg/front_end/testcases/general/enum_names_from_core.dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/enum_names_from_core.dart.strong.outline.expect @@ -23,12 +23,12 @@ class List extends core::Object { ; } class E extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E::int, self::E::Object, self::E::String, self::E::_Enum, self::E::List]; enum-element static const field self::E int = const self::E::•(0, "int"); enum-element static const field self::E Object = const self::E::•(1, "Object"); enum-element static const field self::E String = const self::E::•(2, "String"); enum-element static const field self::E _Enum = const self::E::•(3, "_Enum"); enum-element static const field self::E List = const self::E::•(4, "List"); + static const field core::List values = const [self::E::int, self::E::Object, self::E::String, self::E::_Enum, self::E::List]; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; @@ -40,10 +40,10 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///enum_names_from_core.dart:15:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "int"}, const E{_Enum.index: 1, _Enum._name: "Object"}, const E{_Enum.index: 2, _Enum._name: "String"}, const E{_Enum.index: 3, _Enum._name: "_Enum"}, const E{_Enum.index: 4, _Enum._name: "List"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum_names_from_core.dart:16:3 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "int"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum_names_from_core.dart:17:3 -> InstanceConstant(const E{_Enum.index: 1, _Enum._name: "Object"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum_names_from_core.dart:18:3 -> InstanceConstant(const E{_Enum.index: 2, _Enum._name: "String"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum_names_from_core.dart:19:3 -> InstanceConstant(const E{_Enum.index: 3, _Enum._name: "_Enum"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum_names_from_core.dart:20:3 -> InstanceConstant(const E{_Enum.index: 4, _Enum._name: "List"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///enum_names_from_core.dart:15:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "int"}, const E{_Enum.index: 1, _Enum._name: "Object"}, const E{_Enum.index: 2, _Enum._name: "String"}, const E{_Enum.index: 3, _Enum._name: "_Enum"}, const E{_Enum.index: 4, _Enum._name: "List"}]) Extra constant evaluation: evaluated: 11, effectively constant: 6 diff --git a/pkg/front_end/testcases/general/enum_names_from_core.dart.strong.transformed.expect b/pkg/front_end/testcases/general/enum_names_from_core.dart.strong.transformed.expect index 16db4a42cbf4..23c2db7126ca 100644 --- a/pkg/front_end/testcases/general/enum_names_from_core.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/enum_names_from_core.dart.strong.transformed.expect @@ -28,12 +28,12 @@ class List extends core::Object { ; } class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field self::E int = #C3; enum-element static const field self::E Object = #C6; enum-element static const field self::E String = #C9; enum-element static const field self::E _Enum = #C12; enum-element static const field self::E List = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/enum_super_constructor.dart.strong.expect b/pkg/front_end/testcases/general/enum_super_constructor.dart.strong.expect index 7511f400bda1..f84e8d5bed59 100644 --- a/pkg/front_end/testcases/general/enum_super_constructor.dart.strong.expect +++ b/pkg/front_end/testcases/general/enum_super_constructor.dart.strong.expect @@ -34,10 +34,10 @@ import self as self; import "dart:core" as core; class A extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/general/enum_super_constructor.dart:8:3: Error: Couldn't find constructor 'A'. + enum-element static const field self::A a = invalid-expression "pkg/front_end/testcases/general/enum_super_constructor.dart:8:3: Error: Couldn't find constructor 'a'. a; ^"; - enum-element static const field self::A a = invalid-expression "pkg/front_end/testcases/general/enum_super_constructor.dart:8:3: Error: Couldn't find constructor 'A'. + static const field core::List values = invalid-expression "pkg/front_end/testcases/general/enum_super_constructor.dart:8:3: Error: Couldn't find constructor 'a'. a; ^"; constructor •(core::int #index, core::String #name) → self::A @@ -49,10 +49,10 @@ class A extends core::_Enum /*isEnum*/ { return "A.${this.{core::_Enum::_name}{core::String}}"; } class B extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/general/enum_super_constructor.dart:14:15: Error: Enum constructors can't contain super-initializers. + enum-element static const field self::B b = invalid-expression "pkg/front_end/testcases/general/enum_super_constructor.dart:14:15: Error: Enum constructors can't contain super-initializers. const B() : super(); ^"; - enum-element static const field self::B b = invalid-expression "pkg/front_end/testcases/general/enum_super_constructor.dart:14:15: Error: Enum constructors can't contain super-initializers. + static const field core::List values = invalid-expression "pkg/front_end/testcases/general/enum_super_constructor.dart:14:15: Error: Enum constructors can't contain super-initializers. const B() : super(); ^"; const constructor •(core::int #index, core::String #name) → self::B diff --git a/pkg/front_end/testcases/general/enum_super_constructor.dart.strong.modular.expect b/pkg/front_end/testcases/general/enum_super_constructor.dart.strong.modular.expect index 7511f400bda1..f84e8d5bed59 100644 --- a/pkg/front_end/testcases/general/enum_super_constructor.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/enum_super_constructor.dart.strong.modular.expect @@ -34,10 +34,10 @@ import self as self; import "dart:core" as core; class A extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/general/enum_super_constructor.dart:8:3: Error: Couldn't find constructor 'A'. + enum-element static const field self::A a = invalid-expression "pkg/front_end/testcases/general/enum_super_constructor.dart:8:3: Error: Couldn't find constructor 'a'. a; ^"; - enum-element static const field self::A a = invalid-expression "pkg/front_end/testcases/general/enum_super_constructor.dart:8:3: Error: Couldn't find constructor 'A'. + static const field core::List values = invalid-expression "pkg/front_end/testcases/general/enum_super_constructor.dart:8:3: Error: Couldn't find constructor 'a'. a; ^"; constructor •(core::int #index, core::String #name) → self::A @@ -49,10 +49,10 @@ class A extends core::_Enum /*isEnum*/ { return "A.${this.{core::_Enum::_name}{core::String}}"; } class B extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/general/enum_super_constructor.dart:14:15: Error: Enum constructors can't contain super-initializers. + enum-element static const field self::B b = invalid-expression "pkg/front_end/testcases/general/enum_super_constructor.dart:14:15: Error: Enum constructors can't contain super-initializers. const B() : super(); ^"; - enum-element static const field self::B b = invalid-expression "pkg/front_end/testcases/general/enum_super_constructor.dart:14:15: Error: Enum constructors can't contain super-initializers. + static const field core::List values = invalid-expression "pkg/front_end/testcases/general/enum_super_constructor.dart:14:15: Error: Enum constructors can't contain super-initializers. const B() : super(); ^"; const constructor •(core::int #index, core::String #name) → self::B diff --git a/pkg/front_end/testcases/general/enum_super_constructor.dart.strong.outline.expect b/pkg/front_end/testcases/general/enum_super_constructor.dart.strong.outline.expect index 1a8d559f7333..f256463c60bc 100644 --- a/pkg/front_end/testcases/general/enum_super_constructor.dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/enum_super_constructor.dart.strong.outline.expect @@ -30,18 +30,18 @@ import self as self; import "dart:core" as core; class A extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::A::a]; - enum-element static const field self::A a = invalid-expression "pkg/front_end/testcases/general/enum_super_constructor.dart:8:3: Error: Couldn't find constructor 'A'. + enum-element static const field self::A a = invalid-expression "pkg/front_end/testcases/general/enum_super_constructor.dart:8:3: Error: Couldn't find constructor 'a'. a; ^"; + static const field core::List values = const [self::A::a]; constructor •(core::int #index, core::String #name) → self::A ; method _enumToString() → core::String return "A.${this.{core::_Enum::_name}{core::String}}"; } class B extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::B::b]; enum-element static const field self::B b = const self::B::•(0, "b"); + static const field core::List values = const [self::B::b]; const constructor •(core::int #index, core::String #name) → self::B : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/general/enum_super_constructor.dart:14:15: Error: Enum constructors can't contain super-initializers. const B() : super(); diff --git a/pkg/front_end/testcases/general/enum_super_constructor.dart.strong.transformed.expect b/pkg/front_end/testcases/general/enum_super_constructor.dart.strong.transformed.expect index 7511f400bda1..f84e8d5bed59 100644 --- a/pkg/front_end/testcases/general/enum_super_constructor.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/enum_super_constructor.dart.strong.transformed.expect @@ -34,10 +34,10 @@ import self as self; import "dart:core" as core; class A extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/general/enum_super_constructor.dart:8:3: Error: Couldn't find constructor 'A'. + enum-element static const field self::A a = invalid-expression "pkg/front_end/testcases/general/enum_super_constructor.dart:8:3: Error: Couldn't find constructor 'a'. a; ^"; - enum-element static const field self::A a = invalid-expression "pkg/front_end/testcases/general/enum_super_constructor.dart:8:3: Error: Couldn't find constructor 'A'. + static const field core::List values = invalid-expression "pkg/front_end/testcases/general/enum_super_constructor.dart:8:3: Error: Couldn't find constructor 'a'. a; ^"; constructor •(core::int #index, core::String #name) → self::A @@ -49,10 +49,10 @@ class A extends core::_Enum /*isEnum*/ { return "A.${this.{core::_Enum::_name}{core::String}}"; } class B extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/general/enum_super_constructor.dart:14:15: Error: Enum constructors can't contain super-initializers. + enum-element static const field self::B b = invalid-expression "pkg/front_end/testcases/general/enum_super_constructor.dart:14:15: Error: Enum constructors can't contain super-initializers. const B() : super(); ^"; - enum-element static const field self::B b = invalid-expression "pkg/front_end/testcases/general/enum_super_constructor.dart:14:15: Error: Enum constructors can't contain super-initializers. + static const field core::List values = invalid-expression "pkg/front_end/testcases/general/enum_super_constructor.dart:14:15: Error: Enum constructors can't contain super-initializers. const B() : super(); ^"; const constructor •(core::int #index, core::String #name) → self::B 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 548ffbdb4a26..9dd3099bccdf 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 @@ -2949,8 +2949,8 @@ abstract class _E&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConstru ; } class E extends self::_E&_Enum&C /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super self::_E&_Enum&C::•(#index, #name) ; @@ -2958,8 +2958,8 @@ class E extends self::_E&_Enum&C /*isEnum*/ { return "E.${this.{core::_Enum::_name}{core::String}}"; } class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::E1 element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -2967,8 +2967,8 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::E2 element = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -2976,8 +2976,8 @@ class E2 extends core::_Enum /*isEnum*/ { return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E3 element = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -2990,8 +2990,8 @@ abstract class _E4&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConstr ; } class E4 extends self::_E4&_Enum&C /*isEnum*/ { - static const field core::List values = #C12; enum-element static const field self::E4 element = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super self::_E4&_Enum&C::•(#index, #name) ; @@ -3004,8 +3004,8 @@ abstract class _E5&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConstr ; } class E5 extends self::_E5&_Enum&C /*isEnum*/ { - static const field core::List values = #C14; enum-element static const field self::E5 element = #C13; + static const field core::List values = #C14; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super self::_E5&_Enum&C::•(#index, #name) ; @@ -3018,8 +3018,8 @@ abstract class _E6&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConstr ; } class E6 extends self::_E6&_Enum&C /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field self::E6 element = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super self::_E6&_Enum&C::•(#index, #name) ; @@ -3032,8 +3032,8 @@ abstract class _E7&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConstr ; } class E7 extends self::_E7&_Enum&C /*isEnum*/ { - static const field core::List values = #C18; enum-element static const field self::E7 element = #C17; + static const field core::List values = #C18; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super self::_E7&_Enum&C::•(#index, #name) ; @@ -3046,8 +3046,8 @@ abstract class _E8&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConstr ; } class E8 extends self::_E8&_Enum&C /*isEnum*/ { - static const field core::List values = #C20; enum-element static const field self::E8 element = #C19; + static const field core::List values = #C20; const synthetic constructor •(core::int #index, core::String #name) → self::E8 : super self::_E8&_Enum&C::•(#index, #name) ; @@ -3055,8 +3055,8 @@ class E8 extends self::_E8&_Enum&C /*isEnum*/ { return "E8.${this.{core::_Enum::_name}{core::String}}"; } class E9 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C22; enum-element static const field self::E9 element = #C21; + static const field core::List values = #C22; const synthetic constructor •(core::int #index, core::String #name) → self::E9 : super core::_Enum::•(#index, #name) ; @@ -3064,8 +3064,8 @@ class E9 extends core::_Enum /*isEnum*/ { return "E9.${this.{core::_Enum::_name}{core::String}}"; } class E10 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C24; enum-element static const field self::E10 element = #C23; + static const field core::List values = #C24; const synthetic constructor •(core::int #index, core::String #name) → self::E10 : super core::_Enum::•(#index, #name) ; @@ -3073,8 +3073,8 @@ class E10 extends core::_Enum /*isEnum*/ { return "E10.${this.{core::_Enum::_name}{core::String}}"; } class E11 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C26; enum-element static const field self::E11 element = #C25; + static const field core::List values = #C26; const synthetic constructor •(core::int #index, core::String #name) → self::E11 : super core::_Enum::•(#index, #name) ; @@ -3095,8 +3095,8 @@ abstract class _E13&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConst ; } class E13 extends self::_E13&_Enum&C /*isEnum*/ { - static const field core::List values = #C29; enum-element static const field self::E13 element = #C28; + static const field core::List values = #C29; const synthetic constructor •(core::int #index, core::String #name) → self::E13 : super self::_E13&_Enum&C::•(#index, #name) ; @@ -3109,8 +3109,8 @@ abstract class _E14&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConst ; } class E14 extends self::_E14&_Enum&C /*isEnum*/ { - static const field core::List values = #C31; enum-element static const field self::E14 element = #C30; + static const field core::List values = #C31; const synthetic constructor •(core::int #index, core::String #name) → self::E14 : super self::_E14&_Enum&C::•(#index, #name) ; @@ -3123,8 +3123,8 @@ abstract class _E15&_Enum&D extends core::_Enum /*isAnonymousMixin,hasConstConst ; } class E15 extends self::_E15&_Enum&D /*isEnum*/ { - static const field core::List values = #C33; enum-element static const field self::E15 element = #C32; + static const field core::List values = #C33; const synthetic constructor •(core::int #index, core::String #name) → self::E15 : super self::_E15&_Enum&D::•(#index, #name) ; @@ -3132,8 +3132,8 @@ class E15 extends self::_E15&_Enum&D /*isEnum*/ { return "E15.${this.{core::_Enum::_name}{core::String}}"; } class E16 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C35; enum-element static const field self::E16 element = #C34; + static const field core::List values = #C35; const synthetic constructor •(core::int #index, core::String #name) → self::E16 : super core::_Enum::•(#index, #name) ; @@ -3141,8 +3141,8 @@ class E16 extends core::_Enum /*isEnum*/ { return "E16.${this.{core::_Enum::_name}{core::String}}"; } class E17 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C37; enum-element static const field self::E17 element = #C36; + static const field core::List values = #C37; const synthetic constructor •(core::int #index, core::String #name) → self::E17 : super core::_Enum::•(#index, #name) ; @@ -3150,8 +3150,8 @@ class E17 extends core::_Enum /*isEnum*/ { return "E17.${this.{core::_Enum::_name}{core::String}}"; } class E18 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C39; enum-element static const field self::E18 element = #C38; + static const field core::List values = #C39; const synthetic constructor •(core::int #index, core::String #name) → self::E18 : super core::_Enum::•(#index, #name) ; @@ -3159,8 +3159,8 @@ class E18 extends core::_Enum /*isEnum*/ { return "E18.${this.{core::_Enum::_name}{core::String}}"; } class E19 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C41; enum-element static const field self::E19 element = #C40; + static const field core::List values = #C41; const synthetic constructor •(core::int #index, core::String #name) → self::E19 : super core::_Enum::•(#index, #name) ; @@ -3168,8 +3168,8 @@ class E19 extends core::_Enum /*isEnum*/ { return "E19.${this.{core::_Enum::_name}{core::String}}"; } class E20 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C43; enum-element static const field self::E20 element = #C42; + static const field core::List values = #C43; const synthetic constructor •(core::int #index, core::String #name) → self::E20 : super core::_Enum::•(#index, #name) ; @@ -3182,8 +3182,8 @@ abstract class _E21&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConst ; } class E21 extends self::_E21&_Enum&C /*isEnum*/ { - static const field core::List values = #C45; enum-element static const field self::E21 element = #C44; + static const field core::List values = #C45; const synthetic constructor •(core::int #index, core::String #name) → self::E21 : super self::_E21&_Enum&C::•(#index, #name) ; @@ -3196,8 +3196,8 @@ abstract class _E22&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConst ; } class E22 extends self::_E22&_Enum&C /*isEnum*/ { - static const field core::List values = #C47; enum-element static const field self::E22 element = #C46; + static const field core::List values = #C47; const synthetic constructor •(core::int #index, core::String #name) → self::E22 : super self::_E22&_Enum&C::•(#index, #name) ; @@ -3205,8 +3205,8 @@ class E22 extends self::_E22&_Enum&C /*isEnum*/ { return "E22.${this.{core::_Enum::_name}{core::String}}"; } class E23 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C49; enum-element static const field self::E23 element = #C48; + static const field core::List values = #C49; const synthetic constructor •(core::int #index, core::String #name) → self::E23 : super core::_Enum::•(#index, #name) ; @@ -3214,8 +3214,8 @@ class E23 extends core::_Enum /*isEnum*/ { return "E23.${this.{core::_Enum::_name}{core::String}}"; } class E24 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C51; enum-element static const field self::E24 element = #C50; + static const field core::List values = #C51; const synthetic constructor •(core::int #index, core::String #name) → self::E24 : super core::_Enum::•(#index, #name) ; @@ -3228,8 +3228,8 @@ abstract class _E25&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConst ; } class E25 extends self::_E25&_Enum&C /*isEnum*/ { - static const field core::List values = #C53; enum-element static const field self::E25 element = #C52; + static const field core::List values = #C53; const synthetic constructor •(core::int #index, core::String #name) → self::E25 : super self::_E25&_Enum&C::•(#index, #name) ; @@ -3237,8 +3237,8 @@ class E25 extends self::_E25&_Enum&C /*isEnum*/ { return "E25.${this.{core::_Enum::_name}{core::String}}"; } class E26 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C55; enum-element static const field self::E26 element = #C54; + static const field core::List values = #C55; const synthetic constructor •(core::int #index, core::String #name) → self::E26 : super core::_Enum::•(#index, #name) ; 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 548ffbdb4a26..9dd3099bccdf 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 @@ -2949,8 +2949,8 @@ abstract class _E&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConstru ; } class E extends self::_E&_Enum&C /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super self::_E&_Enum&C::•(#index, #name) ; @@ -2958,8 +2958,8 @@ class E extends self::_E&_Enum&C /*isEnum*/ { return "E.${this.{core::_Enum::_name}{core::String}}"; } class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::E1 element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -2967,8 +2967,8 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::E2 element = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -2976,8 +2976,8 @@ class E2 extends core::_Enum /*isEnum*/ { return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E3 element = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -2990,8 +2990,8 @@ abstract class _E4&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConstr ; } class E4 extends self::_E4&_Enum&C /*isEnum*/ { - static const field core::List values = #C12; enum-element static const field self::E4 element = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super self::_E4&_Enum&C::•(#index, #name) ; @@ -3004,8 +3004,8 @@ abstract class _E5&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConstr ; } class E5 extends self::_E5&_Enum&C /*isEnum*/ { - static const field core::List values = #C14; enum-element static const field self::E5 element = #C13; + static const field core::List values = #C14; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super self::_E5&_Enum&C::•(#index, #name) ; @@ -3018,8 +3018,8 @@ abstract class _E6&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConstr ; } class E6 extends self::_E6&_Enum&C /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field self::E6 element = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super self::_E6&_Enum&C::•(#index, #name) ; @@ -3032,8 +3032,8 @@ abstract class _E7&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConstr ; } class E7 extends self::_E7&_Enum&C /*isEnum*/ { - static const field core::List values = #C18; enum-element static const field self::E7 element = #C17; + static const field core::List values = #C18; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super self::_E7&_Enum&C::•(#index, #name) ; @@ -3046,8 +3046,8 @@ abstract class _E8&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConstr ; } class E8 extends self::_E8&_Enum&C /*isEnum*/ { - static const field core::List values = #C20; enum-element static const field self::E8 element = #C19; + static const field core::List values = #C20; const synthetic constructor •(core::int #index, core::String #name) → self::E8 : super self::_E8&_Enum&C::•(#index, #name) ; @@ -3055,8 +3055,8 @@ class E8 extends self::_E8&_Enum&C /*isEnum*/ { return "E8.${this.{core::_Enum::_name}{core::String}}"; } class E9 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C22; enum-element static const field self::E9 element = #C21; + static const field core::List values = #C22; const synthetic constructor •(core::int #index, core::String #name) → self::E9 : super core::_Enum::•(#index, #name) ; @@ -3064,8 +3064,8 @@ class E9 extends core::_Enum /*isEnum*/ { return "E9.${this.{core::_Enum::_name}{core::String}}"; } class E10 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C24; enum-element static const field self::E10 element = #C23; + static const field core::List values = #C24; const synthetic constructor •(core::int #index, core::String #name) → self::E10 : super core::_Enum::•(#index, #name) ; @@ -3073,8 +3073,8 @@ class E10 extends core::_Enum /*isEnum*/ { return "E10.${this.{core::_Enum::_name}{core::String}}"; } class E11 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C26; enum-element static const field self::E11 element = #C25; + static const field core::List values = #C26; const synthetic constructor •(core::int #index, core::String #name) → self::E11 : super core::_Enum::•(#index, #name) ; @@ -3095,8 +3095,8 @@ abstract class _E13&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConst ; } class E13 extends self::_E13&_Enum&C /*isEnum*/ { - static const field core::List values = #C29; enum-element static const field self::E13 element = #C28; + static const field core::List values = #C29; const synthetic constructor •(core::int #index, core::String #name) → self::E13 : super self::_E13&_Enum&C::•(#index, #name) ; @@ -3109,8 +3109,8 @@ abstract class _E14&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConst ; } class E14 extends self::_E14&_Enum&C /*isEnum*/ { - static const field core::List values = #C31; enum-element static const field self::E14 element = #C30; + static const field core::List values = #C31; const synthetic constructor •(core::int #index, core::String #name) → self::E14 : super self::_E14&_Enum&C::•(#index, #name) ; @@ -3123,8 +3123,8 @@ abstract class _E15&_Enum&D extends core::_Enum /*isAnonymousMixin,hasConstConst ; } class E15 extends self::_E15&_Enum&D /*isEnum*/ { - static const field core::List values = #C33; enum-element static const field self::E15 element = #C32; + static const field core::List values = #C33; const synthetic constructor •(core::int #index, core::String #name) → self::E15 : super self::_E15&_Enum&D::•(#index, #name) ; @@ -3132,8 +3132,8 @@ class E15 extends self::_E15&_Enum&D /*isEnum*/ { return "E15.${this.{core::_Enum::_name}{core::String}}"; } class E16 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C35; enum-element static const field self::E16 element = #C34; + static const field core::List values = #C35; const synthetic constructor •(core::int #index, core::String #name) → self::E16 : super core::_Enum::•(#index, #name) ; @@ -3141,8 +3141,8 @@ class E16 extends core::_Enum /*isEnum*/ { return "E16.${this.{core::_Enum::_name}{core::String}}"; } class E17 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C37; enum-element static const field self::E17 element = #C36; + static const field core::List values = #C37; const synthetic constructor •(core::int #index, core::String #name) → self::E17 : super core::_Enum::•(#index, #name) ; @@ -3150,8 +3150,8 @@ class E17 extends core::_Enum /*isEnum*/ { return "E17.${this.{core::_Enum::_name}{core::String}}"; } class E18 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C39; enum-element static const field self::E18 element = #C38; + static const field core::List values = #C39; const synthetic constructor •(core::int #index, core::String #name) → self::E18 : super core::_Enum::•(#index, #name) ; @@ -3159,8 +3159,8 @@ class E18 extends core::_Enum /*isEnum*/ { return "E18.${this.{core::_Enum::_name}{core::String}}"; } class E19 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C41; enum-element static const field self::E19 element = #C40; + static const field core::List values = #C41; const synthetic constructor •(core::int #index, core::String #name) → self::E19 : super core::_Enum::•(#index, #name) ; @@ -3168,8 +3168,8 @@ class E19 extends core::_Enum /*isEnum*/ { return "E19.${this.{core::_Enum::_name}{core::String}}"; } class E20 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C43; enum-element static const field self::E20 element = #C42; + static const field core::List values = #C43; const synthetic constructor •(core::int #index, core::String #name) → self::E20 : super core::_Enum::•(#index, #name) ; @@ -3182,8 +3182,8 @@ abstract class _E21&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConst ; } class E21 extends self::_E21&_Enum&C /*isEnum*/ { - static const field core::List values = #C45; enum-element static const field self::E21 element = #C44; + static const field core::List values = #C45; const synthetic constructor •(core::int #index, core::String #name) → self::E21 : super self::_E21&_Enum&C::•(#index, #name) ; @@ -3196,8 +3196,8 @@ abstract class _E22&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConst ; } class E22 extends self::_E22&_Enum&C /*isEnum*/ { - static const field core::List values = #C47; enum-element static const field self::E22 element = #C46; + static const field core::List values = #C47; const synthetic constructor •(core::int #index, core::String #name) → self::E22 : super self::_E22&_Enum&C::•(#index, #name) ; @@ -3205,8 +3205,8 @@ class E22 extends self::_E22&_Enum&C /*isEnum*/ { return "E22.${this.{core::_Enum::_name}{core::String}}"; } class E23 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C49; enum-element static const field self::E23 element = #C48; + static const field core::List values = #C49; const synthetic constructor •(core::int #index, core::String #name) → self::E23 : super core::_Enum::•(#index, #name) ; @@ -3214,8 +3214,8 @@ class E23 extends core::_Enum /*isEnum*/ { return "E23.${this.{core::_Enum::_name}{core::String}}"; } class E24 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C51; enum-element static const field self::E24 element = #C50; + static const field core::List values = #C51; const synthetic constructor •(core::int #index, core::String #name) → self::E24 : super core::_Enum::•(#index, #name) ; @@ -3228,8 +3228,8 @@ abstract class _E25&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConst ; } class E25 extends self::_E25&_Enum&C /*isEnum*/ { - static const field core::List values = #C53; enum-element static const field self::E25 element = #C52; + static const field core::List values = #C53; const synthetic constructor •(core::int #index, core::String #name) → self::E25 : super self::_E25&_Enum&C::•(#index, #name) ; @@ -3237,8 +3237,8 @@ class E25 extends self::_E25&_Enum&C /*isEnum*/ { return "E25.${this.{core::_Enum::_name}{core::String}}"; } class E26 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C55; enum-element static const field self::E26 element = #C54; + static const field core::List values = #C55; const synthetic constructor •(core::int #index, core::String #name) → self::E26 : super core::_Enum::•(#index, #name) ; 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 6ab98dcab6d9..d6ecb37fd8d3 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 @@ -2872,8 +2872,8 @@ abstract class _E&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConstru ; } class E extends self::_E&_Enum&C /*isEnum*/ { - static const field core::List values = const [self::E::element]; enum-element static const field self::E element = const self::E::•(0, "element"); + static const field core::List values = const [self::E::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E : super self::_E&_Enum&C::•(#index, #name) ; @@ -2881,8 +2881,8 @@ class E extends self::_E&_Enum&C /*isEnum*/ { return "E.${this.{core::_Enum::_name}{core::String}}"; } class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E1::element]; enum-element static const field self::E1 element = const self::E1::•(0, "element"); + static const field core::List values = const [self::E1::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -2890,8 +2890,8 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E2::element]; enum-element static const field self::E2 element = const self::E2::•(0, "element"); + static const field core::List values = const [self::E2::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -2899,8 +2899,8 @@ class E2 extends core::_Enum /*isEnum*/ { return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E3::element]; enum-element static const field self::E3 element = const self::E3::•(0, "element"); + static const field core::List values = const [self::E3::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -2913,8 +2913,8 @@ abstract class _E4&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConstr ; } class E4 extends self::_E4&_Enum&C /*isEnum*/ { - static const field core::List values = const [self::E4::element]; enum-element static const field self::E4 element = const self::E4::•(0, "element"); + static const field core::List values = const [self::E4::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super self::_E4&_Enum&C::•(#index, #name) ; @@ -2927,8 +2927,8 @@ abstract class _E5&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConstr ; } class E5 extends self::_E5&_Enum&C /*isEnum*/ { - static const field core::List values = const [self::E5::element]; enum-element static const field self::E5 element = const self::E5::•(0, "element"); + static const field core::List values = const [self::E5::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super self::_E5&_Enum&C::•(#index, #name) ; @@ -2941,8 +2941,8 @@ abstract class _E6&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConstr ; } class E6 extends self::_E6&_Enum&C /*isEnum*/ { - static const field core::List values = const [self::E6::element]; enum-element static const field self::E6 element = const self::E6::•(0, "element"); + static const field core::List values = const [self::E6::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super self::_E6&_Enum&C::•(#index, #name) ; @@ -2955,8 +2955,8 @@ abstract class _E7&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConstr ; } class E7 extends self::_E7&_Enum&C /*isEnum*/ { - static const field core::List values = const [self::E7::element]; enum-element static const field self::E7 element = const self::E7::•(0, "element"); + static const field core::List values = const [self::E7::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super self::_E7&_Enum&C::•(#index, #name) ; @@ -2969,8 +2969,8 @@ abstract class _E8&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConstr ; } class E8 extends self::_E8&_Enum&C /*isEnum*/ { - static const field core::List values = const [self::E8::element]; enum-element static const field self::E8 element = const self::E8::•(0, "element"); + static const field core::List values = const [self::E8::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E8 : super self::_E8&_Enum&C::•(#index, #name) ; @@ -2978,8 +2978,8 @@ class E8 extends self::_E8&_Enum&C /*isEnum*/ { return "E8.${this.{core::_Enum::_name}{core::String}}"; } class E9 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E9::element]; enum-element static const field self::E9 element = const self::E9::•(0, "element"); + static const field core::List values = const [self::E9::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E9 : super core::_Enum::•(#index, #name) ; @@ -2987,8 +2987,8 @@ class E9 extends core::_Enum /*isEnum*/ { return "E9.${this.{core::_Enum::_name}{core::String}}"; } class E10 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E10::element]; enum-element static const field self::E10 element = const self::E10::•(0, "element"); + static const field core::List values = const [self::E10::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E10 : super core::_Enum::•(#index, #name) ; @@ -2996,8 +2996,8 @@ class E10 extends core::_Enum /*isEnum*/ { return "E10.${this.{core::_Enum::_name}{core::String}}"; } class E11 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E11::element]; enum-element static const field self::E11 element = const self::E11::•(0, "element"); + static const field core::List values = const [self::E11::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E11 : super core::_Enum::•(#index, #name) ; @@ -3018,8 +3018,8 @@ abstract class _E13&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConst ; } class E13 extends self::_E13&_Enum&C /*isEnum*/ { - static const field core::List values = const [self::E13::element]; enum-element static const field self::E13 element = const self::E13::•(0, "element"); + static const field core::List values = const [self::E13::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E13 : super self::_E13&_Enum&C::•(#index, #name) ; @@ -3032,8 +3032,8 @@ abstract class _E14&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConst ; } class E14 extends self::_E14&_Enum&C /*isEnum*/ { - static const field core::List values = const [self::E14::element]; enum-element static const field self::E14 element = const self::E14::•(0, "element"); + static const field core::List values = const [self::E14::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E14 : super self::_E14&_Enum&C::•(#index, #name) ; @@ -3046,8 +3046,8 @@ abstract class _E15&_Enum&D extends core::_Enum /*isAnonymousMixin,hasConstConst ; } class E15 extends self::_E15&_Enum&D /*isEnum*/ { - static const field core::List values = const [self::E15::element]; enum-element static const field self::E15 element = const self::E15::•(0, "element"); + static const field core::List values = const [self::E15::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E15 : super self::_E15&_Enum&D::•(#index, #name) ; @@ -3055,8 +3055,8 @@ class E15 extends self::_E15&_Enum&D /*isEnum*/ { return "E15.${this.{core::_Enum::_name}{core::String}}"; } class E16 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E16::element]; enum-element static const field self::E16 element = const self::E16::•(0, "element"); + static const field core::List values = const [self::E16::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E16 : super core::_Enum::•(#index, #name) ; @@ -3064,8 +3064,8 @@ class E16 extends core::_Enum /*isEnum*/ { return "E16.${this.{core::_Enum::_name}{core::String}}"; } class E17 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E17::element]; enum-element static const field self::E17 element = const self::E17::•(0, "element"); + static const field core::List values = const [self::E17::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E17 : super core::_Enum::•(#index, #name) ; @@ -3073,8 +3073,8 @@ class E17 extends core::_Enum /*isEnum*/ { return "E17.${this.{core::_Enum::_name}{core::String}}"; } class E18 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E18::element]; enum-element static const field self::E18 element = const self::E18::•(0, "element"); + static const field core::List values = const [self::E18::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E18 : super core::_Enum::•(#index, #name) ; @@ -3082,8 +3082,8 @@ class E18 extends core::_Enum /*isEnum*/ { return "E18.${this.{core::_Enum::_name}{core::String}}"; } class E19 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E19::element]; enum-element static const field self::E19 element = const self::E19::•(0, "element"); + static const field core::List values = const [self::E19::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E19 : super core::_Enum::•(#index, #name) ; @@ -3091,8 +3091,8 @@ class E19 extends core::_Enum /*isEnum*/ { return "E19.${this.{core::_Enum::_name}{core::String}}"; } class E20 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E20::element]; enum-element static const field self::E20 element = const self::E20::•(0, "element"); + static const field core::List values = const [self::E20::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E20 : super core::_Enum::•(#index, #name) ; @@ -3105,8 +3105,8 @@ abstract class _E21&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConst ; } class E21 extends self::_E21&_Enum&C /*isEnum*/ { - static const field core::List values = const [self::E21::element]; enum-element static const field self::E21 element = const self::E21::•(0, "element"); + static const field core::List values = const [self::E21::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E21 : super self::_E21&_Enum&C::•(#index, #name) ; @@ -3119,8 +3119,8 @@ abstract class _E22&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConst ; } class E22 extends self::_E22&_Enum&C /*isEnum*/ { - static const field core::List values = const [self::E22::element]; enum-element static const field self::E22 element = const self::E22::•(0, "element"); + static const field core::List values = const [self::E22::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E22 : super self::_E22&_Enum&C::•(#index, #name) ; @@ -3128,8 +3128,8 @@ class E22 extends self::_E22&_Enum&C /*isEnum*/ { return "E22.${this.{core::_Enum::_name}{core::String}}"; } class E23 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E23::element]; enum-element static const field self::E23 element = const self::E23::•(0, "element"); + static const field core::List values = const [self::E23::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E23 : super core::_Enum::•(#index, #name) ; @@ -3137,8 +3137,8 @@ class E23 extends core::_Enum /*isEnum*/ { return "E23.${this.{core::_Enum::_name}{core::String}}"; } class E24 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E24::element]; enum-element static const field self::E24 element = const self::E24::•(0, "element"); + static const field core::List values = const [self::E24::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E24 : super core::_Enum::•(#index, #name) ; @@ -3151,8 +3151,8 @@ abstract class _E25&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConst ; } class E25 extends self::_E25&_Enum&C /*isEnum*/ { - static const field core::List values = const [self::E25::element]; enum-element static const field self::E25 element = const self::E25::•(0, "element"); + static const field core::List values = const [self::E25::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E25 : super self::_E25&_Enum&C::•(#index, #name) ; @@ -3160,8 +3160,8 @@ class E25 extends self::_E25&_Enum&C /*isEnum*/ { return "E25.${this.{core::_Enum::_name}{core::String}}"; } class E26 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E26::element]; enum-element static const field self::E26 element = const self::E26::•(0, "element"); + static const field core::List values = const [self::E26::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E26 : super core::_Enum::•(#index, #name) ; @@ -3179,57 +3179,57 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:61:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///class_header.dart:61:40 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:62:6 -> ListConstant(const [const E1{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:61:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///class_header.dart:62:41 -> InstanceConstant(const E1{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:63:6 -> ListConstant(const [const E2{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:62:6 -> ListConstant(const [const E1{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///class_header.dart:63:41 -> InstanceConstant(const E2{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:64:6 -> ListConstant(const [const E3{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:63:6 -> ListConstant(const [const E2{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///class_header.dart:64:41 -> InstanceConstant(const E3{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:65:6 -> ListConstant(const [const E4{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:64:6 -> ListConstant(const [const E3{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///class_header.dart:65:41 -> InstanceConstant(const E4{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:66:6 -> ListConstant(const [const E5{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:65:6 -> ListConstant(const [const E4{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///class_header.dart:66:41 -> InstanceConstant(const E5{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:67:6 -> ListConstant(const [const E6{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:66:6 -> ListConstant(const [const E5{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///class_header.dart:67:51 -> InstanceConstant(const E6{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:68:6 -> ListConstant(const [const E7{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:67:6 -> ListConstant(const [const E6{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///class_header.dart:68:54 -> InstanceConstant(const E7{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:69:6 -> ListConstant(const [const E8{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:68:6 -> ListConstant(const [const E7{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///class_header.dart:69:48 -> InstanceConstant(const E8{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:70:6 -> ListConstant(const [const E9{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:69:6 -> ListConstant(const [const E8{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///class_header.dart:70:51 -> InstanceConstant(const E9{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:71:6 -> ListConstant(const [const E10{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:70:6 -> ListConstant(const [const E9{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///class_header.dart:71:55 -> InstanceConstant(const E10{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:72:6 -> ListConstant(const [const E11{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:71:6 -> ListConstant(const [const E10{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///class_header.dart:72:49 -> InstanceConstant(const E11{_Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:72:6 -> ListConstant(const [const E11{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:73:6 -> ListConstant(const []) -Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:74:6 -> ListConstant(const [const E13{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///class_header.dart:74:49 -> InstanceConstant(const E13{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:75:6 -> ListConstant(const [const E14{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:74:6 -> ListConstant(const [const E13{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///class_header.dart:75:55 -> InstanceConstant(const E14{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:76:6 -> ListConstant(const [const E15{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:75:6 -> ListConstant(const [const E14{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///class_header.dart:76:29 -> InstanceConstant(const E15{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:77:6 -> ListConstant(const [const E16{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:76:6 -> ListConstant(const [const E15{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///class_header.dart:77:35 -> InstanceConstant(const E16{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:78:6 -> ListConstant(const [const E17{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:77:6 -> ListConstant(const [const E16{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///class_header.dart:78:32 -> InstanceConstant(const E17{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:79:6 -> ListConstant(const [const E18{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:78:6 -> ListConstant(const [const E17{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///class_header.dart:79:20 -> InstanceConstant(const E18{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:80:6 -> ListConstant(const [const E19{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:79:6 -> ListConstant(const [const E18{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///class_header.dart:80:27 -> InstanceConstant(const E19{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:81:6 -> ListConstant(const [const E20{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:80:6 -> ListConstant(const [const E19{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///class_header.dart:81:17 -> InstanceConstant(const E20{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:82:6 -> ListConstant(const [const E21{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:81:6 -> ListConstant(const [const E20{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///class_header.dart:82:40 -> InstanceConstant(const E21{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:83:6 -> ListConstant(const [const E22{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:82:6 -> ListConstant(const [const E21{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///class_header.dart:83:30 -> InstanceConstant(const E22{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:84:6 -> ListConstant(const [const E23{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:83:6 -> ListConstant(const [const E22{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///class_header.dart:84:23 -> InstanceConstant(const E23{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:85:6 -> ListConstant(const [const E24{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:84:6 -> ListConstant(const [const E23{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///class_header.dart:85:30 -> InstanceConstant(const E24{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:86:6 -> ListConstant(const [const E25{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:85:6 -> ListConstant(const [const E24{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///class_header.dart:86:24 -> InstanceConstant(const E25{_Enum.index: 0, _Enum._name: "element"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:87:6 -> ListConstant(const [const E26{_Enum.index: 0, _Enum._name: "element"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:86:6 -> ListConstant(const [const E25{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///class_header.dart:87:36 -> InstanceConstant(const E26{_Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///class_header.dart:87:6 -> ListConstant(const [const E26{_Enum.index: 0, _Enum._name: "element"}]) Extra constant evaluation: evaluated: 212, effectively constant: 53 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 548ffbdb4a26..9dd3099bccdf 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 @@ -2949,8 +2949,8 @@ abstract class _E&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConstru ; } class E extends self::_E&_Enum&C /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super self::_E&_Enum&C::•(#index, #name) ; @@ -2958,8 +2958,8 @@ class E extends self::_E&_Enum&C /*isEnum*/ { return "E.${this.{core::_Enum::_name}{core::String}}"; } class E1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C6; enum-element static const field self::E1 element = #C5; + static const field core::List values = #C6; const synthetic constructor •(core::int #index, core::String #name) → self::E1 : super core::_Enum::•(#index, #name) ; @@ -2967,8 +2967,8 @@ class E1 extends core::_Enum /*isEnum*/ { return "E1.${this.{core::_Enum::_name}{core::String}}"; } class E2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C8; enum-element static const field self::E2 element = #C7; + static const field core::List values = #C8; const synthetic constructor •(core::int #index, core::String #name) → self::E2 : super core::_Enum::•(#index, #name) ; @@ -2976,8 +2976,8 @@ class E2 extends core::_Enum /*isEnum*/ { return "E2.${this.{core::_Enum::_name}{core::String}}"; } class E3 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E3 element = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E3 : super core::_Enum::•(#index, #name) ; @@ -2990,8 +2990,8 @@ abstract class _E4&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConstr ; } class E4 extends self::_E4&_Enum&C /*isEnum*/ { - static const field core::List values = #C12; enum-element static const field self::E4 element = #C11; + static const field core::List values = #C12; const synthetic constructor •(core::int #index, core::String #name) → self::E4 : super self::_E4&_Enum&C::•(#index, #name) ; @@ -3004,8 +3004,8 @@ abstract class _E5&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConstr ; } class E5 extends self::_E5&_Enum&C /*isEnum*/ { - static const field core::List values = #C14; enum-element static const field self::E5 element = #C13; + static const field core::List values = #C14; const synthetic constructor •(core::int #index, core::String #name) → self::E5 : super self::_E5&_Enum&C::•(#index, #name) ; @@ -3018,8 +3018,8 @@ abstract class _E6&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConstr ; } class E6 extends self::_E6&_Enum&C /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field self::E6 element = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → self::E6 : super self::_E6&_Enum&C::•(#index, #name) ; @@ -3032,8 +3032,8 @@ abstract class _E7&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConstr ; } class E7 extends self::_E7&_Enum&C /*isEnum*/ { - static const field core::List values = #C18; enum-element static const field self::E7 element = #C17; + static const field core::List values = #C18; const synthetic constructor •(core::int #index, core::String #name) → self::E7 : super self::_E7&_Enum&C::•(#index, #name) ; @@ -3046,8 +3046,8 @@ abstract class _E8&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConstr ; } class E8 extends self::_E8&_Enum&C /*isEnum*/ { - static const field core::List values = #C20; enum-element static const field self::E8 element = #C19; + static const field core::List values = #C20; const synthetic constructor •(core::int #index, core::String #name) → self::E8 : super self::_E8&_Enum&C::•(#index, #name) ; @@ -3055,8 +3055,8 @@ class E8 extends self::_E8&_Enum&C /*isEnum*/ { return "E8.${this.{core::_Enum::_name}{core::String}}"; } class E9 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C22; enum-element static const field self::E9 element = #C21; + static const field core::List values = #C22; const synthetic constructor •(core::int #index, core::String #name) → self::E9 : super core::_Enum::•(#index, #name) ; @@ -3064,8 +3064,8 @@ class E9 extends core::_Enum /*isEnum*/ { return "E9.${this.{core::_Enum::_name}{core::String}}"; } class E10 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C24; enum-element static const field self::E10 element = #C23; + static const field core::List values = #C24; const synthetic constructor •(core::int #index, core::String #name) → self::E10 : super core::_Enum::•(#index, #name) ; @@ -3073,8 +3073,8 @@ class E10 extends core::_Enum /*isEnum*/ { return "E10.${this.{core::_Enum::_name}{core::String}}"; } class E11 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C26; enum-element static const field self::E11 element = #C25; + static const field core::List values = #C26; const synthetic constructor •(core::int #index, core::String #name) → self::E11 : super core::_Enum::•(#index, #name) ; @@ -3095,8 +3095,8 @@ abstract class _E13&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConst ; } class E13 extends self::_E13&_Enum&C /*isEnum*/ { - static const field core::List values = #C29; enum-element static const field self::E13 element = #C28; + static const field core::List values = #C29; const synthetic constructor •(core::int #index, core::String #name) → self::E13 : super self::_E13&_Enum&C::•(#index, #name) ; @@ -3109,8 +3109,8 @@ abstract class _E14&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConst ; } class E14 extends self::_E14&_Enum&C /*isEnum*/ { - static const field core::List values = #C31; enum-element static const field self::E14 element = #C30; + static const field core::List values = #C31; const synthetic constructor •(core::int #index, core::String #name) → self::E14 : super self::_E14&_Enum&C::•(#index, #name) ; @@ -3123,8 +3123,8 @@ abstract class _E15&_Enum&D extends core::_Enum /*isAnonymousMixin,hasConstConst ; } class E15 extends self::_E15&_Enum&D /*isEnum*/ { - static const field core::List values = #C33; enum-element static const field self::E15 element = #C32; + static const field core::List values = #C33; const synthetic constructor •(core::int #index, core::String #name) → self::E15 : super self::_E15&_Enum&D::•(#index, #name) ; @@ -3132,8 +3132,8 @@ class E15 extends self::_E15&_Enum&D /*isEnum*/ { return "E15.${this.{core::_Enum::_name}{core::String}}"; } class E16 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C35; enum-element static const field self::E16 element = #C34; + static const field core::List values = #C35; const synthetic constructor •(core::int #index, core::String #name) → self::E16 : super core::_Enum::•(#index, #name) ; @@ -3141,8 +3141,8 @@ class E16 extends core::_Enum /*isEnum*/ { return "E16.${this.{core::_Enum::_name}{core::String}}"; } class E17 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C37; enum-element static const field self::E17 element = #C36; + static const field core::List values = #C37; const synthetic constructor •(core::int #index, core::String #name) → self::E17 : super core::_Enum::•(#index, #name) ; @@ -3150,8 +3150,8 @@ class E17 extends core::_Enum /*isEnum*/ { return "E17.${this.{core::_Enum::_name}{core::String}}"; } class E18 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C39; enum-element static const field self::E18 element = #C38; + static const field core::List values = #C39; const synthetic constructor •(core::int #index, core::String #name) → self::E18 : super core::_Enum::•(#index, #name) ; @@ -3159,8 +3159,8 @@ class E18 extends core::_Enum /*isEnum*/ { return "E18.${this.{core::_Enum::_name}{core::String}}"; } class E19 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C41; enum-element static const field self::E19 element = #C40; + static const field core::List values = #C41; const synthetic constructor •(core::int #index, core::String #name) → self::E19 : super core::_Enum::•(#index, #name) ; @@ -3168,8 +3168,8 @@ class E19 extends core::_Enum /*isEnum*/ { return "E19.${this.{core::_Enum::_name}{core::String}}"; } class E20 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C43; enum-element static const field self::E20 element = #C42; + static const field core::List values = #C43; const synthetic constructor •(core::int #index, core::String #name) → self::E20 : super core::_Enum::•(#index, #name) ; @@ -3182,8 +3182,8 @@ abstract class _E21&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConst ; } class E21 extends self::_E21&_Enum&C /*isEnum*/ { - static const field core::List values = #C45; enum-element static const field self::E21 element = #C44; + static const field core::List values = #C45; const synthetic constructor •(core::int #index, core::String #name) → self::E21 : super self::_E21&_Enum&C::•(#index, #name) ; @@ -3196,8 +3196,8 @@ abstract class _E22&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConst ; } class E22 extends self::_E22&_Enum&C /*isEnum*/ { - static const field core::List values = #C47; enum-element static const field self::E22 element = #C46; + static const field core::List values = #C47; const synthetic constructor •(core::int #index, core::String #name) → self::E22 : super self::_E22&_Enum&C::•(#index, #name) ; @@ -3205,8 +3205,8 @@ class E22 extends self::_E22&_Enum&C /*isEnum*/ { return "E22.${this.{core::_Enum::_name}{core::String}}"; } class E23 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C49; enum-element static const field self::E23 element = #C48; + static const field core::List values = #C49; const synthetic constructor •(core::int #index, core::String #name) → self::E23 : super core::_Enum::•(#index, #name) ; @@ -3214,8 +3214,8 @@ class E23 extends core::_Enum /*isEnum*/ { return "E23.${this.{core::_Enum::_name}{core::String}}"; } class E24 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C51; enum-element static const field self::E24 element = #C50; + static const field core::List values = #C51; const synthetic constructor •(core::int #index, core::String #name) → self::E24 : super core::_Enum::•(#index, #name) ; @@ -3228,8 +3228,8 @@ abstract class _E25&_Enum&C extends core::_Enum /*isAnonymousMixin,hasConstConst ; } class E25 extends self::_E25&_Enum&C /*isEnum*/ { - static const field core::List values = #C53; enum-element static const field self::E25 element = #C52; + static const field core::List values = #C53; const synthetic constructor •(core::int #index, core::String #name) → self::E25 : super self::_E25&_Enum&C::•(#index, #name) ; @@ -3237,8 +3237,8 @@ class E25 extends self::_E25&_Enum&C /*isEnum*/ { return "E25.${this.{core::_Enum::_name}{core::String}}"; } class E26 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C55; enum-element static const field self::E26 element = #C54; + static const field core::List values = #C55; const synthetic constructor •(core::int #index, core::String #name) → self::E26 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/extends_implements_void.dart.strong.expect b/pkg/front_end/testcases/general/extends_implements_void.dart.strong.expect index 605ec23c395f..9e2259f13129 100644 --- a/pkg/front_end/testcases/general/extends_implements_void.dart.strong.expect +++ b/pkg/front_end/testcases/general/extends_implements_void.dart.strong.expect @@ -114,8 +114,8 @@ abstract class _G&_Enum&void extends core::_Enum /*isAnonymousMixin,hasConstCons ; } class G extends self::_G&_Enum&void /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::G g = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::G : super self::_G&_Enum&void::•(#index, #name) ; @@ -123,8 +123,8 @@ class G extends self::_G&_Enum&void /*isEnum*/ { return "G.${this.{core::_Enum::_name}{core::String}}"; } class H extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::H h = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::H : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/extends_implements_void.dart.strong.modular.expect b/pkg/front_end/testcases/general/extends_implements_void.dart.strong.modular.expect index 605ec23c395f..9e2259f13129 100644 --- a/pkg/front_end/testcases/general/extends_implements_void.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/extends_implements_void.dart.strong.modular.expect @@ -114,8 +114,8 @@ abstract class _G&_Enum&void extends core::_Enum /*isAnonymousMixin,hasConstCons ; } class G extends self::_G&_Enum&void /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::G g = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::G : super self::_G&_Enum&void::•(#index, #name) ; @@ -123,8 +123,8 @@ class G extends self::_G&_Enum&void /*isEnum*/ { return "G.${this.{core::_Enum::_name}{core::String}}"; } class H extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::H h = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::H : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/extends_implements_void.dart.strong.outline.expect b/pkg/front_end/testcases/general/extends_implements_void.dart.strong.outline.expect index 7fe7f3411f58..22e0bd90de6b 100644 --- a/pkg/front_end/testcases/general/extends_implements_void.dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/extends_implements_void.dart.strong.outline.expect @@ -111,8 +111,8 @@ abstract class _G&_Enum&void extends core::_Enum /*isAnonymousMixin,hasConstCons ; } class G extends self::_G&_Enum&void /*isEnum*/ { - static const field core::List values = const [self::G::g]; enum-element static const field self::G g = const self::G::•(0, "g"); + static const field core::List values = const [self::G::g]; const synthetic constructor •(core::int #index, core::String #name) → self::G : super self::_G&_Enum&void::•(#index, #name) ; @@ -120,8 +120,8 @@ class G extends self::_G&_Enum&void /*isEnum*/ { return "G.${this.{core::_Enum::_name}{core::String}}"; } class H extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::H::h]; enum-element static const field self::H h = const self::H::•(0, "h"); + static const field core::List values = const [self::H::h]; const synthetic constructor •(core::int #index, core::String #name) → self::H : super core::_Enum::•(#index, #name) ; @@ -140,8 +140,8 @@ static extension-type-member method D|constructor#_#new#tearOff(core::Object o) Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///extends_implements_void.dart:17:6 -> ListConstant(const [const G{_Enum.index: 0, _Enum._name: "g"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///extends_implements_void.dart:17:20 -> InstanceConstant(const G{_Enum.index: 0, _Enum._name: "g"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///extends_implements_void.dart:19:6 -> ListConstant(const [const H{_Enum.index: 0, _Enum._name: "h"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///extends_implements_void.dart:17:6 -> ListConstant(const [const G{_Enum.index: 0, _Enum._name: "g"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///extends_implements_void.dart:19:26 -> InstanceConstant(const H{_Enum.index: 0, _Enum._name: "h"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///extends_implements_void.dart:19:6 -> ListConstant(const [const H{_Enum.index: 0, _Enum._name: "h"}]) Extra constant evaluation: evaluated: 18, effectively constant: 4 diff --git a/pkg/front_end/testcases/general/extends_implements_void.dart.strong.transformed.expect b/pkg/front_end/testcases/general/extends_implements_void.dart.strong.transformed.expect index 605ec23c395f..9e2259f13129 100644 --- a/pkg/front_end/testcases/general/extends_implements_void.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/extends_implements_void.dart.strong.transformed.expect @@ -114,8 +114,8 @@ abstract class _G&_Enum&void extends core::_Enum /*isAnonymousMixin,hasConstCons ; } class G extends self::_G&_Enum&void /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::G g = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::G : super self::_G&_Enum&void::•(#index, #name) ; @@ -123,8 +123,8 @@ class G extends self::_G&_Enum&void /*isEnum*/ { return "G.${this.{core::_Enum::_name}{core::String}}"; } class H extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::H h = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::H : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/instantiate_enum/main.dart.strong.expect b/pkg/front_end/testcases/general/instantiate_enum/main.dart.strong.expect index ff44ed6180a7..59504bf669c0 100644 --- a/pkg/front_end/testcases/general/instantiate_enum/main.dart.strong.expect +++ b/pkg/front_end/testcases/general/instantiate_enum/main.dart.strong.expect @@ -25,10 +25,10 @@ import "org-dartlang-testcase:///main_lib.dart"; typedef Alias1 = self::Enum1; class Enum1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::Enum1 a = #C3; enum-element static const field self::Enum1 b = #C6; enum-element static const field self::Enum1 c = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::Enum1 : super core::_Enum::•(#index, #name) ; @@ -57,10 +57,10 @@ import "dart:core" as core; typedef Alias2 = self2::Enum2; class Enum2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C14; enum-element static const field self2::Enum2 a = #C11; enum-element static const field self2::Enum2 b = #C12; enum-element static const field self2::Enum2 c = #C13; + static const field core::List values = #C14; const synthetic constructor •(core::int #index, core::String #name) → self2::Enum2 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/instantiate_enum/main.dart.strong.modular.expect b/pkg/front_end/testcases/general/instantiate_enum/main.dart.strong.modular.expect index 05ed14f1585c..83d2cc8a0b41 100644 --- a/pkg/front_end/testcases/general/instantiate_enum/main.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/instantiate_enum/main.dart.strong.modular.expect @@ -25,10 +25,10 @@ import "org-dartlang-testcase:///main_lib.dart"; typedef Alias1 = self::Enum1; class Enum1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::Enum1 a = #C3; enum-element static const field self::Enum1 b = #C6; enum-element static const field self::Enum1 c = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::Enum1 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/instantiate_enum/main.dart.strong.outline.expect b/pkg/front_end/testcases/general/instantiate_enum/main.dart.strong.outline.expect index fcc55f7a0ed4..6b71df3239d3 100644 --- a/pkg/front_end/testcases/general/instantiate_enum/main.dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/instantiate_enum/main.dart.strong.outline.expect @@ -6,10 +6,10 @@ import "org-dartlang-testcase:///main_lib.dart"; typedef Alias1 = self::Enum1; class Enum1 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::Enum1::a, self::Enum1::b, self::Enum1::c]; enum-element static const field self::Enum1 a = const self::Enum1::•(0, "a"); enum-element static const field self::Enum1 b = const self::Enum1::•(1, "b"); enum-element static const field self::Enum1 c = const self::Enum1::•(2, "c"); + static const field core::List values = const [self::Enum1::a, self::Enum1::b, self::Enum1::c]; const synthetic constructor •(core::int #index, core::String #name) → self::Enum1 : super core::_Enum::•(#index, #name) ; @@ -27,10 +27,10 @@ import "dart:core" as core; typedef Alias2 = self2::Enum2; class Enum2 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self2::Enum2::a, self2::Enum2::b, self2::Enum2::c]; enum-element static const field self2::Enum2 a = const self2::Enum2::•(0, "a"); enum-element static const field self2::Enum2 b = const self2::Enum2::•(1, "b"); enum-element static const field self2::Enum2 c = const self2::Enum2::•(2, "c"); + static const field core::List values = const [self2::Enum2::a, self2::Enum2::b, self2::Enum2::c]; const synthetic constructor •(core::int #index, core::String #name) → self2::Enum2 : super core::_Enum::•(#index, #name) ; @@ -40,12 +40,12 @@ class Enum2 extends core::_Enum /*isEnum*/ { Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///main.dart:7:6 -> ListConstant(const [const Enum1{_Enum.index: 0, _Enum._name: "a"}, const Enum1{_Enum.index: 1, _Enum._name: "b"}, const Enum1{_Enum.index: 2, _Enum._name: "c"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main.dart:7:14 -> InstanceConstant(const Enum1{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main.dart:7:17 -> InstanceConstant(const Enum1{_Enum.index: 1, _Enum._name: "b"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main.dart:7:20 -> InstanceConstant(const Enum1{_Enum.index: 2, _Enum._name: "c"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///main_lib.dart:5:6 -> ListConstant(const [const Enum2{_Enum.index: 0, _Enum._name: "a"}, const Enum2{_Enum.index: 1, _Enum._name: "b"}, const Enum2{_Enum.index: 2, _Enum._name: "c"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///main.dart:7:6 -> ListConstant(const [const Enum1{_Enum.index: 0, _Enum._name: "a"}, const Enum1{_Enum.index: 1, _Enum._name: "b"}, const Enum1{_Enum.index: 2, _Enum._name: "c"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main_lib.dart:5:14 -> InstanceConstant(const Enum2{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main_lib.dart:5:17 -> InstanceConstant(const Enum2{_Enum.index: 1, _Enum._name: "b"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main_lib.dart:5:20 -> InstanceConstant(const Enum2{_Enum.index: 2, _Enum._name: "c"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///main_lib.dart:5:6 -> ListConstant(const [const Enum2{_Enum.index: 0, _Enum._name: "a"}, const Enum2{_Enum.index: 1, _Enum._name: "b"}, const Enum2{_Enum.index: 2, _Enum._name: "c"}]) Extra constant evaluation: evaluated: 18, effectively constant: 8 diff --git a/pkg/front_end/testcases/general/instantiate_enum/main.dart.strong.transformed.expect b/pkg/front_end/testcases/general/instantiate_enum/main.dart.strong.transformed.expect index ff44ed6180a7..59504bf669c0 100644 --- a/pkg/front_end/testcases/general/instantiate_enum/main.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/instantiate_enum/main.dart.strong.transformed.expect @@ -25,10 +25,10 @@ import "org-dartlang-testcase:///main_lib.dart"; typedef Alias1 = self::Enum1; class Enum1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::Enum1 a = #C3; enum-element static const field self::Enum1 b = #C6; enum-element static const field self::Enum1 c = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::Enum1 : super core::_Enum::•(#index, #name) ; @@ -57,10 +57,10 @@ import "dart:core" as core; typedef Alias2 = self2::Enum2; class Enum2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C14; enum-element static const field self2::Enum2 a = #C11; enum-element static const field self2::Enum2 b = #C12; enum-element static const field self2::Enum2 c = #C13; + static const field core::List values = #C14; const synthetic constructor •(core::int #index, core::String #name) → self2::Enum2 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/issue48487.dart.strong.expect b/pkg/front_end/testcases/general/issue48487.dart.strong.expect index e0e9f51dd244..d979f4f2698e 100644 --- a/pkg/front_end/testcases/general/issue48487.dart.strong.expect +++ b/pkg/front_end/testcases/general/issue48487.dart.strong.expect @@ -14,8 +14,8 @@ import self as self; import "dart:core" as core; class T extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::T t = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::T : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/issue48487.dart.strong.modular.expect b/pkg/front_end/testcases/general/issue48487.dart.strong.modular.expect index e0e9f51dd244..d979f4f2698e 100644 --- a/pkg/front_end/testcases/general/issue48487.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/issue48487.dart.strong.modular.expect @@ -14,8 +14,8 @@ import self as self; import "dart:core" as core; class T extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::T t = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::T : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/issue48487.dart.strong.outline.expect b/pkg/front_end/testcases/general/issue48487.dart.strong.outline.expect index 648877f369d6..5f615931cd9f 100644 --- a/pkg/front_end/testcases/general/issue48487.dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/issue48487.dart.strong.outline.expect @@ -14,8 +14,8 @@ import self as self; import "dart:core" as core; class T extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::T::t]; enum-element static const field self::T t = const self::T::•(0, "t"); + static const field core::List values = const [self::T::t]; const synthetic constructor •(core::int #index, core::String #name) → self::T : super core::_Enum::•(#index, #name) ; @@ -29,6 +29,6 @@ static method main() → void Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///issue48487.dart:7:6 -> ListConstant(const [const T{_Enum.index: 0, _Enum._name: "t"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue48487.dart:8:3 -> InstanceConstant(const T{_Enum.index: 0, _Enum._name: "t"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///issue48487.dart:7:6 -> ListConstant(const [const T{_Enum.index: 0, _Enum._name: "t"}]) Extra constant evaluation: evaluated: 7, effectively constant: 2 diff --git a/pkg/front_end/testcases/general/issue48487.dart.strong.transformed.expect b/pkg/front_end/testcases/general/issue48487.dart.strong.transformed.expect index e0e9f51dd244..d979f4f2698e 100644 --- a/pkg/front_end/testcases/general/issue48487.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/issue48487.dart.strong.transformed.expect @@ -14,8 +14,8 @@ import self as self; import "dart:core" as core; class T extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::T t = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::T : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/issue48487b.dart.strong.expect b/pkg/front_end/testcases/general/issue48487b.dart.strong.expect index a1d186e8a5bd..50cecdd1194a 100644 --- a/pkg/front_end/testcases/general/issue48487b.dart.strong.expect +++ b/pkg/front_end/testcases/general/issue48487b.dart.strong.expect @@ -14,10 +14,10 @@ import self as self; import "dart:core" as core; class T extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/general/issue48487b.dart:8:3: Error: Couldn't find constructor 'T'. + enum-element static const field self::T t = invalid-expression "pkg/front_end/testcases/general/issue48487b.dart:8:3: Error: Couldn't find constructor 't'. t; ^"; - enum-element static const field self::T t = invalid-expression "pkg/front_end/testcases/general/issue48487b.dart:8:3: Error: Couldn't find constructor 'T'. + static const field core::List values = invalid-expression "pkg/front_end/testcases/general/issue48487b.dart:8:3: Error: Couldn't find constructor 't'. t; ^"; const constructor named(core::int #index, core::String #name) → self::T diff --git a/pkg/front_end/testcases/general/issue48487b.dart.strong.modular.expect b/pkg/front_end/testcases/general/issue48487b.dart.strong.modular.expect index a1d186e8a5bd..50cecdd1194a 100644 --- a/pkg/front_end/testcases/general/issue48487b.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/issue48487b.dart.strong.modular.expect @@ -14,10 +14,10 @@ import self as self; import "dart:core" as core; class T extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/general/issue48487b.dart:8:3: Error: Couldn't find constructor 'T'. + enum-element static const field self::T t = invalid-expression "pkg/front_end/testcases/general/issue48487b.dart:8:3: Error: Couldn't find constructor 't'. t; ^"; - enum-element static const field self::T t = invalid-expression "pkg/front_end/testcases/general/issue48487b.dart:8:3: Error: Couldn't find constructor 'T'. + static const field core::List values = invalid-expression "pkg/front_end/testcases/general/issue48487b.dart:8:3: Error: Couldn't find constructor 't'. t; ^"; const constructor named(core::int #index, core::String #name) → self::T diff --git a/pkg/front_end/testcases/general/issue48487b.dart.strong.outline.expect b/pkg/front_end/testcases/general/issue48487b.dart.strong.outline.expect index 99edf57dc36b..88f5a4120447 100644 --- a/pkg/front_end/testcases/general/issue48487b.dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/issue48487b.dart.strong.outline.expect @@ -14,10 +14,10 @@ import self as self; import "dart:core" as core; class T extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::T::t]; - enum-element static const field self::T t = invalid-expression "pkg/front_end/testcases/general/issue48487b.dart:8:3: Error: Couldn't find constructor 'T'. + enum-element static const field self::T t = invalid-expression "pkg/front_end/testcases/general/issue48487b.dart:8:3: Error: Couldn't find constructor 't'. t; ^"; + static const field core::List values = const [self::T::t]; const constructor named(core::int #index, core::String #name) → self::T : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/issue48487b.dart.strong.transformed.expect b/pkg/front_end/testcases/general/issue48487b.dart.strong.transformed.expect index a1d186e8a5bd..50cecdd1194a 100644 --- a/pkg/front_end/testcases/general/issue48487b.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/issue48487b.dart.strong.transformed.expect @@ -14,10 +14,10 @@ import self as self; import "dart:core" as core; class T extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/general/issue48487b.dart:8:3: Error: Couldn't find constructor 'T'. + enum-element static const field self::T t = invalid-expression "pkg/front_end/testcases/general/issue48487b.dart:8:3: Error: Couldn't find constructor 't'. t; ^"; - enum-element static const field self::T t = invalid-expression "pkg/front_end/testcases/general/issue48487b.dart:8:3: Error: Couldn't find constructor 'T'. + static const field core::List values = invalid-expression "pkg/front_end/testcases/general/issue48487b.dart:8:3: Error: Couldn't find constructor 't'. t; ^"; const constructor named(core::int #index, core::String #name) → self::T diff --git a/pkg/front_end/testcases/general/issue49216.dart.strong.expect b/pkg/front_end/testcases/general/issue49216.dart.strong.expect index d9b27ea98a64..5d65bdf54782 100644 --- a/pkg/front_end/testcases/general/issue49216.dart.strong.expect +++ b/pkg/front_end/testcases/general/issue49216.dart.strong.expect @@ -3,8 +3,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E foo = #C3; + static const field core::List values = #C4; const constructor •(core::int #index, core::String #name, [core::int x = #C1, core::String y = #C5, core::num? z = #C6]) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/issue49216.dart.strong.modular.expect b/pkg/front_end/testcases/general/issue49216.dart.strong.modular.expect index d9b27ea98a64..5d65bdf54782 100644 --- a/pkg/front_end/testcases/general/issue49216.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/issue49216.dart.strong.modular.expect @@ -3,8 +3,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E foo = #C3; + static const field core::List values = #C4; const constructor •(core::int #index, core::String #name, [core::int x = #C1, core::String y = #C5, core::num? z = #C6]) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/issue49216.dart.strong.outline.expect b/pkg/front_end/testcases/general/issue49216.dart.strong.outline.expect index 33858c462cd0..0a49d65f03b6 100644 --- a/pkg/front_end/testcases/general/issue49216.dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/issue49216.dart.strong.outline.expect @@ -3,8 +3,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E::foo]; enum-element static const field self::E foo = const self::E::•(0, "foo"); + static const field core::List values = const [self::E::foo]; const constructor •(core::int #index, core::String #name, [core::int x = 0, core::String y = "", core::num? z = null]) → self::E : super core::_Enum::•(#index, #name) ; @@ -19,6 +19,6 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///issue49216.dart:5:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "foo"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue49216.dart:6:3 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "foo"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///issue49216.dart:5:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "foo"}]) Extra constant evaluation: evaluated: 9, effectively constant: 2 diff --git a/pkg/front_end/testcases/general/issue49216.dart.strong.transformed.expect b/pkg/front_end/testcases/general/issue49216.dart.strong.transformed.expect index d9b27ea98a64..5d65bdf54782 100644 --- a/pkg/front_end/testcases/general/issue49216.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/issue49216.dart.strong.transformed.expect @@ -3,8 +3,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E foo = #C3; + static const field core::List values = #C4; const constructor •(core::int #index, core::String #name, [core::int x = #C1, core::String y = #C5, core::num? z = #C6]) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/issue49697/main.dart.strong.expect b/pkg/front_end/testcases/general/issue49697/main.dart.strong.expect index 20533a501f4b..a3bb9a0da889 100644 --- a/pkg/front_end/testcases/general/issue49697/main.dart.strong.expect +++ b/pkg/front_end/testcases/general/issue49697/main.dart.strong.expect @@ -6,9 +6,9 @@ import "main_lib.dart" as mai; import "org-dartlang-testcase:///main_lib.dart"; class A extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::A a = #C3; enum-element static const field self::A b = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::A : super core::_Enum::•(#index, #name) ; @@ -16,10 +16,10 @@ class A extends core::_Enum /*isEnum*/ { return "A.${this.{core::_Enum::_name}{core::String}}"; } class B extends core::_Enum /*isEnum*/ { - static const field self::B c = #C8; - static const field core::List values = #C10; enum-element static const field self::B a = #C8; enum-element static const field self::B b = #C9; + static const field self::B c = #C8; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::B : super core::_Enum::•(#index, #name) ; @@ -144,9 +144,9 @@ import self as mai; import "dart:core" as core; class C extends core::_Enum /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field mai::C a = #C12; enum-element static const field mai::C b = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → mai::C : super core::_Enum::•(#index, #name) ; @@ -154,10 +154,10 @@ class C extends core::_Enum /*isEnum*/ { return "C.${this.{core::_Enum::_name}{core::String}}"; } class D extends core::_Enum /*isEnum*/ { - static const field mai::D c = #C13; - static const field core::List values = #C17; enum-element static const field mai::D a = #C13; enum-element static const field mai::D b = #C14; + static const field mai::D c = #C13; + static const field core::List values = #C17; const synthetic constructor •(core::int #index, core::String #name) → mai::D : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/issue49697/main.dart.strong.modular.expect b/pkg/front_end/testcases/general/issue49697/main.dart.strong.modular.expect index a79ed150ce39..14e31fe523fa 100644 --- a/pkg/front_end/testcases/general/issue49697/main.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/issue49697/main.dart.strong.modular.expect @@ -6,9 +6,9 @@ import "main_lib.dart" as mai; import "org-dartlang-testcase:///main_lib.dart"; class A extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::A a = #C3; enum-element static const field self::A b = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::A : super core::_Enum::•(#index, #name) ; @@ -16,10 +16,10 @@ class A extends core::_Enum /*isEnum*/ { return "A.${this.{core::_Enum::_name}{core::String}}"; } class B extends core::_Enum /*isEnum*/ { - static const field self::B c = #C8; - static const field core::List values = #C10; enum-element static const field self::B a = #C8; enum-element static const field self::B b = #C9; + static const field self::B c = #C8; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::B : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/issue49697/main.dart.strong.outline.expect b/pkg/front_end/testcases/general/issue49697/main.dart.strong.outline.expect index 08d9e0bd9871..6e0a6bd1a835 100644 --- a/pkg/front_end/testcases/general/issue49697/main.dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/issue49697/main.dart.strong.outline.expect @@ -6,9 +6,9 @@ import "main_lib.dart" as mai; import "org-dartlang-testcase:///main_lib.dart"; class A extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::A::a, self::A::b]; enum-element static const field self::A a = const self::A::•(0, "a"); enum-element static const field self::A b = const self::A::•(1, "b"); + static const field core::List values = const [self::A::a, self::A::b]; const synthetic constructor •(core::int #index, core::String #name) → self::A : super core::_Enum::•(#index, #name) ; @@ -16,10 +16,10 @@ class A extends core::_Enum /*isEnum*/ { return "A.${this.{core::_Enum::_name}{core::String}}"; } class B extends core::_Enum /*isEnum*/ { - static const field self::B c = self::B::a; - static const field core::List values = const [self::B::a, self::B::b]; enum-element static const field self::B a = const self::B::•(0, "a"); enum-element static const field self::B b = const self::B::•(1, "b"); + static const field self::B c = self::B::a; + static const field core::List values = const [self::B::a, self::B::b]; const synthetic constructor •(core::int #index, core::String #name) → self::B : super core::_Enum::•(#index, #name) ; @@ -50,9 +50,9 @@ import self as mai; import "dart:core" as core; class C extends core::_Enum /*isEnum*/ { - static const field core::List values = const [mai::C::a, mai::C::b]; enum-element static const field mai::C a = const mai::C::•(0, "a"); enum-element static const field mai::C b = const mai::C::•(1, "b"); + static const field core::List values = const [mai::C::a, mai::C::b]; const synthetic constructor •(core::int #index, core::String #name) → mai::C : super core::_Enum::•(#index, #name) ; @@ -60,10 +60,10 @@ class C extends core::_Enum /*isEnum*/ { return "C.${this.{core::_Enum::_name}{core::String}}"; } class D extends core::_Enum /*isEnum*/ { - static const field mai::D c = mai::D::a; - static const field core::List values = const [mai::D::a, mai::D::b]; enum-element static const field mai::D a = const mai::D::•(0, "a"); enum-element static const field mai::D b = const mai::D::•(1, "b"); + static const field mai::D c = mai::D::a; + static const field core::List values = const [mai::D::a, mai::D::b]; const synthetic constructor •(core::int #index, core::String #name) → mai::D : super core::_Enum::•(#index, #name) ; @@ -73,18 +73,18 @@ class D extends core::_Enum /*isEnum*/ { Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///main.dart:9:6 -> ListConstant(const [const A{_Enum.index: 0, _Enum._name: "a"}, const A{_Enum.index: 1, _Enum._name: "b"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main.dart:9:10 -> InstanceConstant(const A{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main.dart:9:13 -> InstanceConstant(const A{_Enum.index: 1, _Enum._name: "b"}) -Evaluated: StaticGet @ org-dartlang-testcase:///main.dart:15:24 -> InstanceConstant(const B{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///main.dart:11:6 -> ListConstant(const [const B{_Enum.index: 0, _Enum._name: "a"}, const B{_Enum.index: 1, _Enum._name: "b"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///main.dart:9:6 -> ListConstant(const [const A{_Enum.index: 0, _Enum._name: "a"}, const A{_Enum.index: 1, _Enum._name: "b"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main.dart:12:3 -> InstanceConstant(const B{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main.dart:13:3 -> InstanceConstant(const B{_Enum.index: 1, _Enum._name: "b"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///main_lib.dart:7:6 -> ListConstant(const [const C{_Enum.index: 0, _Enum._name: "a"}, const C{_Enum.index: 1, _Enum._name: "b"}]) +Evaluated: StaticGet @ org-dartlang-testcase:///main.dart:15:24 -> InstanceConstant(const B{_Enum.index: 0, _Enum._name: "a"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///main.dart:11:6 -> ListConstant(const [const B{_Enum.index: 0, _Enum._name: "a"}, const B{_Enum.index: 1, _Enum._name: "b"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main_lib.dart:7:10 -> InstanceConstant(const C{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main_lib.dart:7:13 -> InstanceConstant(const C{_Enum.index: 1, _Enum._name: "b"}) -Evaluated: StaticGet @ org-dartlang-testcase:///main_lib.dart:13:24 -> InstanceConstant(const D{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///main_lib.dart:9:6 -> ListConstant(const [const D{_Enum.index: 0, _Enum._name: "a"}, const D{_Enum.index: 1, _Enum._name: "b"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///main_lib.dart:7:6 -> ListConstant(const [const C{_Enum.index: 0, _Enum._name: "a"}, const C{_Enum.index: 1, _Enum._name: "b"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main_lib.dart:10:3 -> InstanceConstant(const D{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main_lib.dart:11:3 -> InstanceConstant(const D{_Enum.index: 1, _Enum._name: "b"}) +Evaluated: StaticGet @ org-dartlang-testcase:///main_lib.dart:13:24 -> InstanceConstant(const D{_Enum.index: 0, _Enum._name: "a"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///main_lib.dart:9:6 -> ListConstant(const [const D{_Enum.index: 0, _Enum._name: "a"}, const D{_Enum.index: 1, _Enum._name: "b"}]) Extra constant evaluation: evaluated: 34, effectively constant: 14 diff --git a/pkg/front_end/testcases/general/issue49697/main.dart.strong.transformed.expect b/pkg/front_end/testcases/general/issue49697/main.dart.strong.transformed.expect index 20533a501f4b..a3bb9a0da889 100644 --- a/pkg/front_end/testcases/general/issue49697/main.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/issue49697/main.dart.strong.transformed.expect @@ -6,9 +6,9 @@ import "main_lib.dart" as mai; import "org-dartlang-testcase:///main_lib.dart"; class A extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::A a = #C3; enum-element static const field self::A b = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::A : super core::_Enum::•(#index, #name) ; @@ -16,10 +16,10 @@ class A extends core::_Enum /*isEnum*/ { return "A.${this.{core::_Enum::_name}{core::String}}"; } class B extends core::_Enum /*isEnum*/ { - static const field self::B c = #C8; - static const field core::List values = #C10; enum-element static const field self::B a = #C8; enum-element static const field self::B b = #C9; + static const field self::B c = #C8; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::B : super core::_Enum::•(#index, #name) ; @@ -144,9 +144,9 @@ import self as mai; import "dart:core" as core; class C extends core::_Enum /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field mai::C a = #C12; enum-element static const field mai::C b = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → mai::C : super core::_Enum::•(#index, #name) ; @@ -154,10 +154,10 @@ class C extends core::_Enum /*isEnum*/ { return "C.${this.{core::_Enum::_name}{core::String}}"; } class D extends core::_Enum /*isEnum*/ { - static const field mai::D c = #C13; - static const field core::List values = #C17; enum-element static const field mai::D a = #C13; enum-element static const field mai::D b = #C14; + static const field mai::D c = #C13; + static const field core::List values = #C17; const synthetic constructor •(core::int #index, core::String #name) → mai::D : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/issue49697_2/main.dart.strong.expect b/pkg/front_end/testcases/general/issue49697_2/main.dart.strong.expect index 9b273235723d..4e9fa932ee44 100644 --- a/pkg/front_end/testcases/general/issue49697_2/main.dart.strong.expect +++ b/pkg/front_end/testcases/general/issue49697_2/main.dart.strong.expect @@ -45,9 +45,9 @@ import "main_lib.dart" as mai; import "org-dartlang-testcase:///main_lib.dart"; class A extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::A a = #C3; enum-element static const field self::A b = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::A : super core::_Enum::•(#index, #name) ; @@ -55,10 +55,10 @@ class A extends core::_Enum /*isEnum*/ { return "A.${this.{core::_Enum::_name}{core::String}}"; } class B extends core::_Enum /*isEnum*/ { - static const field self::B c = #C8; - static const field core::List values = #C10; enum-element static const field self::B a = #C8; enum-element static const field self::B b = #C9; + static const field self::B c = #C8; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::B : super core::_Enum::•(#index, #name) ; @@ -191,9 +191,9 @@ import self as mai; import "dart:core" as core; class C extends core::_Enum /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field mai::C a = #C12; enum-element static const field mai::C b = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → mai::C : super core::_Enum::•(#index, #name) ; @@ -201,10 +201,10 @@ class C extends core::_Enum /*isEnum*/ { return "C.${this.{core::_Enum::_name}{core::String}}"; } class D extends core::_Enum /*isEnum*/ { - static const field mai::D c = #C13; - static const field core::List values = #C17; enum-element static const field mai::D a = #C13; enum-element static const field mai::D b = #C14; + static const field mai::D c = #C13; + static const field core::List values = #C17; const synthetic constructor •(core::int #index, core::String #name) → mai::D : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/issue49697_2/main.dart.strong.modular.expect b/pkg/front_end/testcases/general/issue49697_2/main.dart.strong.modular.expect index 5ac1dabaac32..80bced5a9707 100644 --- a/pkg/front_end/testcases/general/issue49697_2/main.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/issue49697_2/main.dart.strong.modular.expect @@ -45,9 +45,9 @@ import "main_lib.dart" as mai; import "org-dartlang-testcase:///main_lib.dart"; class A extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::A a = #C3; enum-element static const field self::A b = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::A : super core::_Enum::•(#index, #name) ; @@ -55,10 +55,10 @@ class A extends core::_Enum /*isEnum*/ { return "A.${this.{core::_Enum::_name}{core::String}}"; } class B extends core::_Enum /*isEnum*/ { - static const field self::B c = #C8; - static const field core::List values = #C10; enum-element static const field self::B a = #C8; enum-element static const field self::B b = #C9; + static const field self::B c = #C8; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::B : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/issue49697_2/main.dart.strong.outline.expect b/pkg/front_end/testcases/general/issue49697_2/main.dart.strong.outline.expect index 4a5ed92cfd51..384ffef07158 100644 --- a/pkg/front_end/testcases/general/issue49697_2/main.dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/issue49697_2/main.dart.strong.outline.expect @@ -6,9 +6,9 @@ import "main_lib.dart" as mai; import "org-dartlang-testcase:///main_lib.dart"; class A extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::A::a, self::A::b]; enum-element static const field self::A a = const self::A::•(0, "a"); enum-element static const field self::A b = const self::A::•(1, "b"); + static const field core::List values = const [self::A::a, self::A::b]; const synthetic constructor •(core::int #index, core::String #name) → self::A : super core::_Enum::•(#index, #name) ; @@ -16,10 +16,10 @@ class A extends core::_Enum /*isEnum*/ { return "A.${this.{core::_Enum::_name}{core::String}}"; } class B extends core::_Enum /*isEnum*/ { - static const field self::B c = self::B::a; - static const field core::List values = const [self::B::a, self::B::b]; enum-element static const field self::B a = const self::B::•(0, "a"); enum-element static const field self::B b = const self::B::•(1, "b"); + static const field self::B c = self::B::a; + static const field core::List values = const [self::B::a, self::B::b]; const synthetic constructor •(core::int #index, core::String #name) → self::B : super core::_Enum::•(#index, #name) ; @@ -50,9 +50,9 @@ import self as mai; import "dart:core" as core; class C extends core::_Enum /*isEnum*/ { - static const field core::List values = const [mai::C::a, mai::C::b]; enum-element static const field mai::C a = const mai::C::•(0, "a"); enum-element static const field mai::C b = const mai::C::•(1, "b"); + static const field core::List values = const [mai::C::a, mai::C::b]; const synthetic constructor •(core::int #index, core::String #name) → mai::C : super core::_Enum::•(#index, #name) ; @@ -60,10 +60,10 @@ class C extends core::_Enum /*isEnum*/ { return "C.${this.{core::_Enum::_name}{core::String}}"; } class D extends core::_Enum /*isEnum*/ { - static const field mai::D c = mai::D::a; - static const field core::List values = const [mai::D::a, mai::D::b]; enum-element static const field mai::D a = const mai::D::•(0, "a"); enum-element static const field mai::D b = const mai::D::•(1, "b"); + static const field mai::D c = mai::D::a; + static const field core::List values = const [mai::D::a, mai::D::b]; const synthetic constructor •(core::int #index, core::String #name) → mai::D : super core::_Enum::•(#index, #name) ; @@ -73,18 +73,18 @@ class D extends core::_Enum /*isEnum*/ { Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///main.dart:7:6 -> ListConstant(const [const A{_Enum.index: 0, _Enum._name: "a"}, const A{_Enum.index: 1, _Enum._name: "b"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main.dart:7:10 -> InstanceConstant(const A{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main.dart:7:13 -> InstanceConstant(const A{_Enum.index: 1, _Enum._name: "b"}) -Evaluated: StaticGet @ org-dartlang-testcase:///main.dart:13:24 -> InstanceConstant(const B{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///main.dart:9:6 -> ListConstant(const [const B{_Enum.index: 0, _Enum._name: "a"}, const B{_Enum.index: 1, _Enum._name: "b"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///main.dart:7:6 -> ListConstant(const [const A{_Enum.index: 0, _Enum._name: "a"}, const A{_Enum.index: 1, _Enum._name: "b"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main.dart:10:3 -> InstanceConstant(const B{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main.dart:11:3 -> InstanceConstant(const B{_Enum.index: 1, _Enum._name: "b"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///main_lib.dart:5:6 -> ListConstant(const [const C{_Enum.index: 0, _Enum._name: "a"}, const C{_Enum.index: 1, _Enum._name: "b"}]) +Evaluated: StaticGet @ org-dartlang-testcase:///main.dart:13:24 -> InstanceConstant(const B{_Enum.index: 0, _Enum._name: "a"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///main.dart:9:6 -> ListConstant(const [const B{_Enum.index: 0, _Enum._name: "a"}, const B{_Enum.index: 1, _Enum._name: "b"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main_lib.dart:5:10 -> InstanceConstant(const C{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main_lib.dart:5:13 -> InstanceConstant(const C{_Enum.index: 1, _Enum._name: "b"}) -Evaluated: StaticGet @ org-dartlang-testcase:///main_lib.dart:11:24 -> InstanceConstant(const D{_Enum.index: 0, _Enum._name: "a"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///main_lib.dart:7:6 -> ListConstant(const [const D{_Enum.index: 0, _Enum._name: "a"}, const D{_Enum.index: 1, _Enum._name: "b"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///main_lib.dart:5:6 -> ListConstant(const [const C{_Enum.index: 0, _Enum._name: "a"}, const C{_Enum.index: 1, _Enum._name: "b"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main_lib.dart:8:3 -> InstanceConstant(const D{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main_lib.dart:9:3 -> InstanceConstant(const D{_Enum.index: 1, _Enum._name: "b"}) +Evaluated: StaticGet @ org-dartlang-testcase:///main_lib.dart:11:24 -> InstanceConstant(const D{_Enum.index: 0, _Enum._name: "a"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///main_lib.dart:7:6 -> ListConstant(const [const D{_Enum.index: 0, _Enum._name: "a"}, const D{_Enum.index: 1, _Enum._name: "b"}]) Extra constant evaluation: evaluated: 34, effectively constant: 14 diff --git a/pkg/front_end/testcases/general/issue49697_2/main.dart.strong.transformed.expect b/pkg/front_end/testcases/general/issue49697_2/main.dart.strong.transformed.expect index 9b273235723d..4e9fa932ee44 100644 --- a/pkg/front_end/testcases/general/issue49697_2/main.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/issue49697_2/main.dart.strong.transformed.expect @@ -45,9 +45,9 @@ import "main_lib.dart" as mai; import "org-dartlang-testcase:///main_lib.dart"; class A extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::A a = #C3; enum-element static const field self::A b = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::A : super core::_Enum::•(#index, #name) ; @@ -55,10 +55,10 @@ class A extends core::_Enum /*isEnum*/ { return "A.${this.{core::_Enum::_name}{core::String}}"; } class B extends core::_Enum /*isEnum*/ { - static const field self::B c = #C8; - static const field core::List values = #C10; enum-element static const field self::B a = #C8; enum-element static const field self::B b = #C9; + static const field self::B c = #C8; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::B : super core::_Enum::•(#index, #name) ; @@ -191,9 +191,9 @@ import self as mai; import "dart:core" as core; class C extends core::_Enum /*isEnum*/ { - static const field core::List values = #C16; enum-element static const field mai::C a = #C12; enum-element static const field mai::C b = #C15; + static const field core::List values = #C16; const synthetic constructor •(core::int #index, core::String #name) → mai::C : super core::_Enum::•(#index, #name) ; @@ -201,10 +201,10 @@ class C extends core::_Enum /*isEnum*/ { return "C.${this.{core::_Enum::_name}{core::String}}"; } class D extends core::_Enum /*isEnum*/ { - static const field mai::D c = #C13; - static const field core::List values = #C17; enum-element static const field mai::D a = #C13; enum-element static const field mai::D b = #C14; + static const field mai::D c = #C13; + static const field core::List values = #C17; const synthetic constructor •(core::int #index, core::String #name) → mai::D : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/issue54267a.dart.strong.expect b/pkg/front_end/testcases/general/issue54267a.dart.strong.expect index f2bb6a46616c..1f27ee952d76 100644 --- a/pkg/front_end/testcases/general/issue54267a.dart.strong.expect +++ b/pkg/front_end/testcases/general/issue54267a.dart.strong.expect @@ -31,10 +31,6 @@ import self as self; import "dart:core" as core; class A extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/general/issue54267a.dart:6:4: Error: Too many positional arguments: 2 allowed, but 3 found. -Try removing the extra positional arguments. - a(0), - ^"; enum-element static const field invalid-type a = invalid-expression "pkg/front_end/testcases/general/issue54267a.dart:6:4: Error: Too many positional arguments: 2 allowed, but 3 found. Try removing the extra positional arguments. a(0), @@ -43,6 +39,10 @@ Try removing the extra positional arguments. Try removing the extra positional arguments. b(1), ^"; + static const field core::List values = invalid-expression "pkg/front_end/testcases/general/issue54267a.dart:6:4: Error: Too many positional arguments: 2 allowed, but 3 found. +Try removing the extra positional arguments. + a(0), + ^"; const synthetic constructor •(core::int #index, core::String #name) → self::A : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/issue54267a.dart.strong.modular.expect b/pkg/front_end/testcases/general/issue54267a.dart.strong.modular.expect index f2bb6a46616c..1f27ee952d76 100644 --- a/pkg/front_end/testcases/general/issue54267a.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/issue54267a.dart.strong.modular.expect @@ -31,10 +31,6 @@ import self as self; import "dart:core" as core; class A extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/general/issue54267a.dart:6:4: Error: Too many positional arguments: 2 allowed, but 3 found. -Try removing the extra positional arguments. - a(0), - ^"; enum-element static const field invalid-type a = invalid-expression "pkg/front_end/testcases/general/issue54267a.dart:6:4: Error: Too many positional arguments: 2 allowed, but 3 found. Try removing the extra positional arguments. a(0), @@ -43,6 +39,10 @@ Try removing the extra positional arguments. Try removing the extra positional arguments. b(1), ^"; + static const field core::List values = invalid-expression "pkg/front_end/testcases/general/issue54267a.dart:6:4: Error: Too many positional arguments: 2 allowed, but 3 found. +Try removing the extra positional arguments. + a(0), + ^"; const synthetic constructor •(core::int #index, core::String #name) → self::A : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/issue54267a.dart.strong.outline.expect b/pkg/front_end/testcases/general/issue54267a.dart.strong.outline.expect index ea611fe7cdd8..84c8a8fa6012 100644 --- a/pkg/front_end/testcases/general/issue54267a.dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/issue54267a.dart.strong.outline.expect @@ -31,7 +31,6 @@ import self as self; import "dart:core" as core; class A extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::A::a, self::A::b]; enum-element static const field invalid-type a = invalid-expression "pkg/front_end/testcases/general/issue54267a.dart:6:4: Error: Too many positional arguments: 2 allowed, but 3 found. Try removing the extra positional arguments. a(0), @@ -40,6 +39,7 @@ Try removing the extra positional arguments. Try removing the extra positional arguments. b(1), ^"; + static const field core::List values = const [self::A::a, self::A::b]; const synthetic constructor •(core::int #index, core::String #name) → self::A : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/issue54267a.dart.strong.transformed.expect b/pkg/front_end/testcases/general/issue54267a.dart.strong.transformed.expect index f2bb6a46616c..1f27ee952d76 100644 --- a/pkg/front_end/testcases/general/issue54267a.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/issue54267a.dart.strong.transformed.expect @@ -31,10 +31,6 @@ import self as self; import "dart:core" as core; class A extends core::_Enum /*isEnum*/ { - static const field core::List values = invalid-expression "pkg/front_end/testcases/general/issue54267a.dart:6:4: Error: Too many positional arguments: 2 allowed, but 3 found. -Try removing the extra positional arguments. - a(0), - ^"; enum-element static const field invalid-type a = invalid-expression "pkg/front_end/testcases/general/issue54267a.dart:6:4: Error: Too many positional arguments: 2 allowed, but 3 found. Try removing the extra positional arguments. a(0), @@ -43,6 +39,10 @@ Try removing the extra positional arguments. Try removing the extra positional arguments. b(1), ^"; + static const field core::List values = invalid-expression "pkg/front_end/testcases/general/issue54267a.dart:6:4: Error: Too many positional arguments: 2 allowed, but 3 found. +Try removing the extra positional arguments. + a(0), + ^"; const synthetic constructor •(core::int #index, core::String #name) → self::A : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/issue54267b.dart.strong.expect b/pkg/front_end/testcases/general/issue54267b.dart.strong.expect index 5c07b192307b..0c43d8728765 100644 --- a/pkg/front_end/testcases/general/issue54267b.dart.strong.expect +++ b/pkg/front_end/testcases/general/issue54267b.dart.strong.expect @@ -15,14 +15,14 @@ import self as self; import "dart:core" as core; class A extends core::_Enum /*isEnum*/ { - final field core::int value2 = null; - static const field core::List values = invalid-expression "pkg/front_end/testcases/general/issue54267b.dart:10:16: Error: 'value' isn't an instance field of this class. - const A(this.value); - ^^^^^"; enum-element static const field self::A a = invalid-expression "pkg/front_end/testcases/general/issue54267b.dart:10:16: Error: 'value' isn't an instance field of this class. const A(this.value); ^^^^^"; enum-element static const field self::A b = invalid-expression "pkg/front_end/testcases/general/issue54267b.dart:10:16: Error: 'value' isn't an instance field of this class. + const A(this.value); + ^^^^^"; + final field core::int value2 = null; + static const field core::List values = invalid-expression "pkg/front_end/testcases/general/issue54267b.dart:10:16: Error: 'value' isn't an instance field of this class. const A(this.value); ^^^^^"; const constructor •(core::int #index, core::String #name, dynamic value) → self::A diff --git a/pkg/front_end/testcases/general/issue54267b.dart.strong.modular.expect b/pkg/front_end/testcases/general/issue54267b.dart.strong.modular.expect index 5c07b192307b..0c43d8728765 100644 --- a/pkg/front_end/testcases/general/issue54267b.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/issue54267b.dart.strong.modular.expect @@ -15,14 +15,14 @@ import self as self; import "dart:core" as core; class A extends core::_Enum /*isEnum*/ { - final field core::int value2 = null; - static const field core::List values = invalid-expression "pkg/front_end/testcases/general/issue54267b.dart:10:16: Error: 'value' isn't an instance field of this class. - const A(this.value); - ^^^^^"; enum-element static const field self::A a = invalid-expression "pkg/front_end/testcases/general/issue54267b.dart:10:16: Error: 'value' isn't an instance field of this class. const A(this.value); ^^^^^"; enum-element static const field self::A b = invalid-expression "pkg/front_end/testcases/general/issue54267b.dart:10:16: Error: 'value' isn't an instance field of this class. + const A(this.value); + ^^^^^"; + final field core::int value2 = null; + static const field core::List values = invalid-expression "pkg/front_end/testcases/general/issue54267b.dart:10:16: Error: 'value' isn't an instance field of this class. const A(this.value); ^^^^^"; const constructor •(core::int #index, core::String #name, dynamic value) → self::A diff --git a/pkg/front_end/testcases/general/issue54267b.dart.strong.outline.expect b/pkg/front_end/testcases/general/issue54267b.dart.strong.outline.expect index c1511ee65c89..5c6a5e6d1b63 100644 --- a/pkg/front_end/testcases/general/issue54267b.dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/issue54267b.dart.strong.outline.expect @@ -10,10 +10,10 @@ import self as self; import "dart:core" as core; class A extends core::_Enum /*isEnum*/ { - final field core::int value2; - static const field core::List values = const [self::A::a, self::A::b]; enum-element static const field self::A a = const self::A::•(0, "a", 0); enum-element static const field self::A b = const self::A::•(1, "b", 1); + final field core::int value2; + static const field core::List values = const [self::A::a, self::A::b]; const constructor •(core::int #index, core::String #name, dynamic value) → self::A : final dynamic #t1 = invalid-expression "pkg/front_end/testcases/general/issue54267b.dart:10:16: Error: 'value' isn't an instance field of this class. const A(this.value); diff --git a/pkg/front_end/testcases/general/issue54267b.dart.strong.transformed.expect b/pkg/front_end/testcases/general/issue54267b.dart.strong.transformed.expect index 5c07b192307b..0c43d8728765 100644 --- a/pkg/front_end/testcases/general/issue54267b.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/issue54267b.dart.strong.transformed.expect @@ -15,14 +15,14 @@ import self as self; import "dart:core" as core; class A extends core::_Enum /*isEnum*/ { - final field core::int value2 = null; - static const field core::List values = invalid-expression "pkg/front_end/testcases/general/issue54267b.dart:10:16: Error: 'value' isn't an instance field of this class. - const A(this.value); - ^^^^^"; enum-element static const field self::A a = invalid-expression "pkg/front_end/testcases/general/issue54267b.dart:10:16: Error: 'value' isn't an instance field of this class. const A(this.value); ^^^^^"; enum-element static const field self::A b = invalid-expression "pkg/front_end/testcases/general/issue54267b.dart:10:16: Error: 'value' isn't an instance field of this class. + const A(this.value); + ^^^^^"; + final field core::int value2 = null; + static const field core::List values = invalid-expression "pkg/front_end/testcases/general/issue54267b.dart:10:16: Error: 'value' isn't an instance field of this class. const A(this.value); ^^^^^"; const constructor •(core::int #index, core::String #name, dynamic value) → self::A diff --git a/pkg/front_end/testcases/general/issue55152.dart.strong.expect b/pkg/front_end/testcases/general/issue55152.dart.strong.expect index 37461e234985..0faf79cbec1d 100644 --- a/pkg/front_end/testcases/general/issue55152.dart.strong.expect +++ b/pkg/front_end/testcases/general/issue55152.dart.strong.expect @@ -11,9 +11,9 @@ class A extends core::Object /*hasConstConstr return new self::A::•(); } class E extends core::_Enum /*isEnum*/ { + enum-element static const field self::E element = #C4; final field self::A a; static const field core::List values = #C5; - enum-element static const field self::E element = #C4; const constructor •(core::int #index, core::String #name, self::A a) → self::E : self::E::a = a, super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/issue55152.dart.strong.modular.expect b/pkg/front_end/testcases/general/issue55152.dart.strong.modular.expect index 37461e234985..0faf79cbec1d 100644 --- a/pkg/front_end/testcases/general/issue55152.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/issue55152.dart.strong.modular.expect @@ -11,9 +11,9 @@ class A extends core::Object /*hasConstConstr return new self::A::•(); } class E extends core::_Enum /*isEnum*/ { + enum-element static const field self::E element = #C4; final field self::A a; static const field core::List values = #C5; - enum-element static const field self::E element = #C4; const constructor •(core::int #index, core::String #name, self::A a) → self::E : self::E::a = a, super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/issue55152.dart.strong.outline.expect b/pkg/front_end/testcases/general/issue55152.dart.strong.outline.expect index c14fad37d008..332c1dc6bde0 100644 --- a/pkg/front_end/testcases/general/issue55152.dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/issue55152.dart.strong.outline.expect @@ -11,9 +11,9 @@ class A extends core::Object /*hasConstConstr return new self::A::•(); } class E extends core::_Enum /*isEnum*/ { + enum-element static const field self::E element = const self::E::•(0, "element", const self::A::•()); final field self::A a; static const field core::List values = const [self::E::element]; - enum-element static const field self::E element = const self::E::•(0, "element", const self::A::•()); const constructor •(core::int #index, core::String #name, self::A a) → self::E : self::E::a = a, super core::_Enum::•(#index, #name) ; @@ -23,6 +23,6 @@ class E extends core::_Enum /*isEnum*/ { Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///issue55152.dart:12:6 -> ListConstant(const [const E{E.a: const A{}, _Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue55152.dart:14:3 -> InstanceConstant(const E{E.a: const A{}, _Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///issue55152.dart:12:6 -> ListConstant(const [const E{E.a: const A{}, _Enum.index: 0, _Enum._name: "element"}]) Extra constant evaluation: evaluated: 9, effectively constant: 2 diff --git a/pkg/front_end/testcases/general/issue55152.dart.strong.transformed.expect b/pkg/front_end/testcases/general/issue55152.dart.strong.transformed.expect index 37461e234985..0faf79cbec1d 100644 --- a/pkg/front_end/testcases/general/issue55152.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/issue55152.dart.strong.transformed.expect @@ -11,9 +11,9 @@ class A extends core::Object /*hasConstConstr return new self::A::•(); } class E extends core::_Enum /*isEnum*/ { + enum-element static const field self::E element = #C4; final field self::A a; static const field core::List values = #C5; - enum-element static const field self::E element = #C4; const constructor •(core::int #index, core::String #name, self::A a) → self::E : self::E::a = a, super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/metadata_enum.dart.strong.expect b/pkg/front_end/testcases/general/metadata_enum.dart.strong.expect index bffa6b480bc5..7202407c5138 100644 --- a/pkg/front_end/testcases/general/metadata_enum.dart.strong.expect +++ b/pkg/front_end/testcases/general/metadata_enum.dart.strong.expect @@ -4,10 +4,10 @@ import "dart:core" as core; @#C1 class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C11; enum-element static const field self::E E1 = #C4; enum-element static const field self::E E2 = #C7; enum-element static const field self::E E3 = #C10; + static const field core::List values = #C11; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/metadata_enum.dart.strong.modular.expect b/pkg/front_end/testcases/general/metadata_enum.dart.strong.modular.expect index bffa6b480bc5..7202407c5138 100644 --- a/pkg/front_end/testcases/general/metadata_enum.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/metadata_enum.dart.strong.modular.expect @@ -4,10 +4,10 @@ import "dart:core" as core; @#C1 class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C11; enum-element static const field self::E E1 = #C4; enum-element static const field self::E E2 = #C7; enum-element static const field self::E E3 = #C10; + static const field core::List values = #C11; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/metadata_enum.dart.strong.outline.expect b/pkg/front_end/testcases/general/metadata_enum.dart.strong.outline.expect index c4d5bc886aa3..4b47165c7c42 100644 --- a/pkg/front_end/testcases/general/metadata_enum.dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/metadata_enum.dart.strong.outline.expect @@ -4,10 +4,10 @@ import "dart:core" as core; @self::a class E extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E::E1, self::E::E2, self::E::E3]; enum-element static const field self::E E1 = const self::E::•(0, "E1"); enum-element static const field self::E E2 = const self::E::•(1, "E2"); enum-element static const field self::E E3 = const self::E::•(2, "E3"); + static const field core::List values = const [self::E::E1, self::E::E2, self::E::E3]; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; @@ -21,8 +21,8 @@ static method main() → dynamic Extra constant evaluation status: Evaluated: StaticGet @ org-dartlang-testcase:///metadata_enum.dart:7:2 -> NullConstant(null) -Evaluated: ListLiteral @ org-dartlang-testcase:///metadata_enum.dart:8:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "E1"}, const E{_Enum.index: 1, _Enum._name: "E2"}, const E{_Enum.index: 2, _Enum._name: "E3"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///metadata_enum.dart:8:10 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "E1"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///metadata_enum.dart:8:14 -> InstanceConstant(const E{_Enum.index: 1, _Enum._name: "E2"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///metadata_enum.dart:8:18 -> InstanceConstant(const E{_Enum.index: 2, _Enum._name: "E3"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///metadata_enum.dart:8:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "E1"}, const E{_Enum.index: 1, _Enum._name: "E2"}, const E{_Enum.index: 2, _Enum._name: "E3"}]) Extra constant evaluation: evaluated: 10, effectively constant: 5 diff --git a/pkg/front_end/testcases/general/metadata_enum.dart.strong.transformed.expect b/pkg/front_end/testcases/general/metadata_enum.dart.strong.transformed.expect index bffa6b480bc5..7202407c5138 100644 --- a/pkg/front_end/testcases/general/metadata_enum.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/metadata_enum.dart.strong.transformed.expect @@ -4,10 +4,10 @@ import "dart:core" as core; @#C1 class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C11; enum-element static const field self::E E1 = #C4; enum-element static const field self::E E2 = #C7; enum-element static const field self::E E3 = #C10; + static const field core::List values = #C11; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/type_scopes.dart.strong.expect b/pkg/front_end/testcases/general/type_scopes.dart.strong.expect index d0d8b8eb7859..a10fc5784d81 100644 --- a/pkg/front_end/testcases/general/type_scopes.dart.strong.expect +++ b/pkg/front_end/testcases/general/type_scopes.dart.strong.expect @@ -71,9 +71,9 @@ abstract class _Enum&_Enum&M = core::_Enum with self::M extends self::_Enum&_Enum&M implements self::I /*isEnum*/ { + enum-element static const field self::Enum a = #C3; static field dynamic staticField = null; static const field core::List> values = #C4; - enum-element static const field self::Enum a = #C3; const constructor •(core::int #index, core::String #name, self::Enum::T10% T10) → self::Enum : super self::_Enum&_Enum&M::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/type_scopes.dart.strong.modular.expect b/pkg/front_end/testcases/general/type_scopes.dart.strong.modular.expect index d0d8b8eb7859..a10fc5784d81 100644 --- a/pkg/front_end/testcases/general/type_scopes.dart.strong.modular.expect +++ b/pkg/front_end/testcases/general/type_scopes.dart.strong.modular.expect @@ -71,9 +71,9 @@ abstract class _Enum&_Enum&M = core::_Enum with self::M extends self::_Enum&_Enum&M implements self::I /*isEnum*/ { + enum-element static const field self::Enum a = #C3; static field dynamic staticField = null; static const field core::List> values = #C4; - enum-element static const field self::Enum a = #C3; const constructor •(core::int #index, core::String #name, self::Enum::T10% T10) → self::Enum : super self::_Enum&_Enum&M::•(#index, #name) ; diff --git a/pkg/front_end/testcases/general/type_scopes.dart.strong.outline.expect b/pkg/front_end/testcases/general/type_scopes.dart.strong.outline.expect index f9e38872df57..15bcfe0768a6 100644 --- a/pkg/front_end/testcases/general/type_scopes.dart.strong.outline.expect +++ b/pkg/front_end/testcases/general/type_scopes.dart.strong.outline.expect @@ -74,9 +74,9 @@ abstract class _Enum&_Enum&M = core::_Enum with self::M extends self::_Enum&_Enum&M implements self::I /*isEnum*/ { + enum-element static const field self::Enum a = const self::Enum::•(0, "a", 0); static field dynamic staticField; static const field core::List> values = const >[self::Enum::a]; - enum-element static const field self::Enum a = const self::Enum::•(0, "a", 0); const constructor •(core::int #index, core::String #name, self::Enum::T10% T10) → self::Enum : super self::_Enum&_Enum&M::•(#index, #name) ; @@ -159,6 +159,6 @@ static extension-type-member method ET|constructor#_#new#tearOff ListConstant(const >[const Enum{_Enum.index: 0, _Enum._name: "a"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///type_scopes.dart:28:3 -> InstanceConstant(const Enum{_Enum.index: 0, _Enum._name: "a"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///type_scopes.dart:27:6 -> ListConstant(const >[const Enum{_Enum.index: 0, _Enum._name: "a"}]) Extra constant evaluation: evaluated: 38, effectively constant: 2 diff --git a/pkg/front_end/testcases/general/type_scopes.dart.strong.transformed.expect b/pkg/front_end/testcases/general/type_scopes.dart.strong.transformed.expect index 0101b02da93a..36326077e0b3 100644 --- a/pkg/front_end/testcases/general/type_scopes.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/general/type_scopes.dart.strong.transformed.expect @@ -67,9 +67,9 @@ abstract class _Enum&_Enum&M extends core::_Enum implements ; } class Enum extends self::_Enum&_Enum&M implements self::I /*isEnum*/ { + enum-element static const field self::Enum a = #C3; static field dynamic staticField = null; static const field core::List> values = #C4; - enum-element static const field self::Enum a = #C3; const constructor •(core::int #index, core::String #name, self::Enum::T10% T10) → self::Enum : super self::_Enum&_Enum&M::•(#index, #name) ; diff --git a/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_hashcode.dart.strong.expect b/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_hashcode.dart.strong.expect index 130c4f603013..f18874dce38a 100644 --- a/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_hashcode.dart.strong.expect +++ b/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_hashcode.dart.strong.expect @@ -13,8 +13,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_hashcode.dart.strong.modular.expect b/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_hashcode.dart.strong.modular.expect index 130c4f603013..f18874dce38a 100644 --- a/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_hashcode.dart.strong.modular.expect +++ b/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_hashcode.dart.strong.modular.expect @@ -13,8 +13,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_hashcode.dart.strong.outline.expect b/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_hashcode.dart.strong.outline.expect index bd7da9455a3c..95ea4b33f732 100644 --- a/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_hashcode.dart.strong.outline.expect +++ b/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_hashcode.dart.strong.outline.expect @@ -13,8 +13,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E::element]; enum-element static const field self::E element = const self::E::•(0, "element"); + static const field core::List values = const [self::E::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; @@ -26,6 +26,6 @@ class E extends core::_Enum /*isEnum*/ { Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:7:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_hashcode.dart:8:3 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_hashcode.dart:7:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "element"}]) Extra constant evaluation: evaluated: 7, effectively constant: 2 diff --git a/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_hashcode.dart.strong.transformed.expect b/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_hashcode.dart.strong.transformed.expect index 130c4f603013..f18874dce38a 100644 --- a/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_hashcode.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_hashcode.dart.strong.transformed.expect @@ -13,8 +13,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_index.dart.strong.expect b/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_index.dart.strong.expect index 0923ff704051..b7a7bb59b42b 100644 --- a/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_index.dart.strong.expect +++ b/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_index.dart.strong.expect @@ -13,8 +13,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_index.dart.strong.modular.expect b/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_index.dart.strong.modular.expect index 0923ff704051..b7a7bb59b42b 100644 --- a/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_index.dart.strong.modular.expect +++ b/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_index.dart.strong.modular.expect @@ -13,8 +13,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_index.dart.strong.outline.expect b/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_index.dart.strong.outline.expect index d84dec7f99d2..074dd7ca60a0 100644 --- a/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_index.dart.strong.outline.expect +++ b/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_index.dart.strong.outline.expect @@ -13,8 +13,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E::element]; enum-element static const field self::E element = const self::E::•(0, "element"); + static const field core::List values = const [self::E::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; @@ -26,6 +26,6 @@ class E extends core::_Enum /*isEnum*/ { Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:7:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_index.dart:8:3 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_index.dart:7:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "element"}]) Extra constant evaluation: evaluated: 7, effectively constant: 2 diff --git a/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_index.dart.strong.transformed.expect b/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_index.dart.strong.transformed.expect index 0923ff704051..b7a7bb59b42b 100644 --- a/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_index.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_index.dart.strong.transformed.expect @@ -13,8 +13,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_values.dart.strong.expect b/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_values.dart.strong.expect index 69e433b34207..27ef3a27f174 100644 --- a/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_values.dart.strong.expect +++ b/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_values.dart.strong.expect @@ -15,8 +15,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_values.dart.strong.modular.expect b/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_values.dart.strong.modular.expect index 69e433b34207..27ef3a27f174 100644 --- a/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_values.dart.strong.modular.expect +++ b/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_values.dart.strong.modular.expect @@ -15,8 +15,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_values.dart.strong.outline.expect b/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_values.dart.strong.outline.expect index 329583279eb1..b4133ff9446b 100644 --- a/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_values.dart.strong.outline.expect +++ b/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_values.dart.strong.outline.expect @@ -15,8 +15,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E::element]; enum-element static const field self::E element = const self::E::•(0, "element"); + static const field core::List values = const [self::E::element]; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; @@ -28,6 +28,6 @@ class E extends core::_Enum /*isEnum*/ { Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///declared_values.dart:7:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "element"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///declared_values.dart:8:3 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "element"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///declared_values.dart:7:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "element"}]) Extra constant evaluation: evaluated: 7, effectively constant: 2 diff --git a/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_values.dart.strong.transformed.expect b/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_values.dart.strong.transformed.expect index 69e433b34207..27ef3a27f174 100644 --- a/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_values.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/getter_setter_error/pre_feature/declared_values.dart.strong.transformed.expect @@ -15,8 +15,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E element = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/getter_setter_error/pre_feature/setter_getter_type_check.dart.strong.expect b/pkg/front_end/testcases/getter_setter_error/pre_feature/setter_getter_type_check.dart.strong.expect index 2f6348f3263a..edbbbd0fd0f9 100644 --- a/pkg/front_end/testcases/getter_setter_error/pre_feature/setter_getter_type_check.dart.strong.expect +++ b/pkg/front_end/testcases/getter_setter_error/pre_feature/setter_getter_type_check.dart.strong.expect @@ -14,8 +14,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C4; enum-element static const field self::E element2 = #C3; + static const field core::List> values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/getter_setter_error/pre_feature/setter_getter_type_check.dart.strong.modular.expect b/pkg/front_end/testcases/getter_setter_error/pre_feature/setter_getter_type_check.dart.strong.modular.expect index 2f6348f3263a..edbbbd0fd0f9 100644 --- a/pkg/front_end/testcases/getter_setter_error/pre_feature/setter_getter_type_check.dart.strong.modular.expect +++ b/pkg/front_end/testcases/getter_setter_error/pre_feature/setter_getter_type_check.dart.strong.modular.expect @@ -14,8 +14,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C4; enum-element static const field self::E element2 = #C3; + static const field core::List> values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/getter_setter_error/pre_feature/setter_getter_type_check.dart.strong.outline.expect b/pkg/front_end/testcases/getter_setter_error/pre_feature/setter_getter_type_check.dart.strong.outline.expect index da17f5b5b74f..8d71d2ecdb00 100644 --- a/pkg/front_end/testcases/getter_setter_error/pre_feature/setter_getter_type_check.dart.strong.outline.expect +++ b/pkg/front_end/testcases/getter_setter_error/pre_feature/setter_getter_type_check.dart.strong.outline.expect @@ -14,8 +14,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List> values = const >[self::E::element2]; enum-element static const field self::E element2 = const self::E::•(0, "element2"); + static const field core::List> values = const >[self::E::element2]; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; @@ -27,6 +27,6 @@ class E extends core::_Enum /*isEnum*/ { Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///setter_getter_type_check.dart:7:6 -> ListConstant(const >[const E{_Enum.index: 0, _Enum._name: "element2"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///setter_getter_type_check.dart:8:3 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "element2"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///setter_getter_type_check.dart:7:6 -> ListConstant(const >[const E{_Enum.index: 0, _Enum._name: "element2"}]) Extra constant evaluation: evaluated: 7, effectively constant: 2 diff --git a/pkg/front_end/testcases/getter_setter_error/pre_feature/setter_getter_type_check.dart.strong.transformed.expect b/pkg/front_end/testcases/getter_setter_error/pre_feature/setter_getter_type_check.dart.strong.transformed.expect index 2f6348f3263a..edbbbd0fd0f9 100644 --- a/pkg/front_end/testcases/getter_setter_error/pre_feature/setter_getter_type_check.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/getter_setter_error/pre_feature/setter_getter_type_check.dart.strong.transformed.expect @@ -14,8 +14,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C4; enum-element static const field self::E element2 = #C3; + static const field core::List> values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/incremental/export_through_dill.yaml.world.1.expect b/pkg/front_end/testcases/incremental/export_through_dill.yaml.world.1.expect index 7a3a814e517c..5984b8188c77 100644 --- a/pkg/front_end/testcases/incremental/export_through_dill.yaml.world.1.expect +++ b/pkg/front_end/testcases/incremental/export_through_dill.yaml.world.1.expect @@ -12,9 +12,9 @@ library from "org-dartlang-test:///lib2.dart" as lib2 { typedef Typedef = dart.core::int; class Enum extends dart.core::_Enum /*isEnum*/ { - static const field dart.core::List values = #C7; enum-element static const field lib2::Enum a = #C3; enum-element static const field lib2::Enum b = #C6; + static const field dart.core::List values = #C7; const synthetic constructor •(dart.core::int #index, dart.core::String #name) → lib2::Enum : super dart.core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/incremental/export_through_dill.yaml.world.2.expect b/pkg/front_end/testcases/incremental/export_through_dill.yaml.world.2.expect index 7a3a814e517c..5984b8188c77 100644 --- a/pkg/front_end/testcases/incremental/export_through_dill.yaml.world.2.expect +++ b/pkg/front_end/testcases/incremental/export_through_dill.yaml.world.2.expect @@ -12,9 +12,9 @@ library from "org-dartlang-test:///lib2.dart" as lib2 { typedef Typedef = dart.core::int; class Enum extends dart.core::_Enum /*isEnum*/ { - static const field dart.core::List values = #C7; enum-element static const field lib2::Enum a = #C3; enum-element static const field lib2::Enum b = #C6; + static const field dart.core::List values = #C7; const synthetic constructor •(dart.core::int #index, dart.core::String #name) → lib2::Enum : super dart.core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/incremental/no_outline_change_2.yaml.world.1.expect b/pkg/front_end/testcases/incremental/no_outline_change_2.yaml.world.1.expect index 965cf1197638..d238073414b3 100644 --- a/pkg/front_end/testcases/incremental/no_outline_change_2.yaml.world.1.expect +++ b/pkg/front_end/testcases/incremental/no_outline_change_2.yaml.world.1.expect @@ -22,11 +22,11 @@ library from "org-dartlang-test:///main.dart" as main { } } class CompilationStrategy extends dart.core::_Enum /*isEnum*/ { - static const field dart.core::List values = #C14; enum-element static const field main::CompilationStrategy direct = #C4; enum-element static const field main::CompilationStrategy toKernel = #C7; enum-element static const field main::CompilationStrategy toData = #C10; enum-element static const field main::CompilationStrategy fromData = #C13; + static const field dart.core::List values = #C14; const synthetic constructor •(dart.core::int #index, dart.core::String #name) → main::CompilationStrategy : super dart.core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/incremental/no_outline_change_2.yaml.world.2.expect b/pkg/front_end/testcases/incremental/no_outline_change_2.yaml.world.2.expect index ba691133b3da..cb40b66d21d3 100644 --- a/pkg/front_end/testcases/incremental/no_outline_change_2.yaml.world.2.expect +++ b/pkg/front_end/testcases/incremental/no_outline_change_2.yaml.world.2.expect @@ -22,11 +22,11 @@ library from "org-dartlang-test:///main.dart" as main { } } class CompilationStrategy extends dart.core::_Enum /*isEnum*/ { - static const field dart.core::List values = #C14; enum-element static const field main::CompilationStrategy direct = #C4; enum-element static const field main::CompilationStrategy toKernel = #C7; enum-element static const field main::CompilationStrategy toData = #C10; enum-element static const field main::CompilationStrategy fromData = #C13; + static const field dart.core::List values = #C14; const synthetic constructor •(dart.core::int #index, dart.core::String #name) → main::CompilationStrategy : super dart.core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/incremental/no_outline_change_6.yaml.world.1.expect b/pkg/front_end/testcases/incremental/no_outline_change_6.yaml.world.1.expect index 27ad263a0367..cca9a1c31335 100644 --- a/pkg/front_end/testcases/incremental/no_outline_change_6.yaml.world.1.expect +++ b/pkg/front_end/testcases/incremental/no_outline_change_6.yaml.world.1.expect @@ -29,11 +29,11 @@ library from "org-dartlang-test:///main.dart" as main { } } class CompilationStrategy extends dart.core::_Enum /*isEnum*/ { - static const field dart.core::List values = #C14; enum-element static const field main::CompilationStrategy direct = #C4; enum-element static const field main::CompilationStrategy toKernel = #C7; enum-element static const field main::CompilationStrategy toData = #C10; enum-element static const field main::CompilationStrategy fromData = #C13; + static const field dart.core::List values = #C14; const synthetic constructor •(dart.core::int #index, dart.core::String #name) → main::CompilationStrategy : super dart.core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/incremental/no_outline_change_6.yaml.world.2.expect b/pkg/front_end/testcases/incremental/no_outline_change_6.yaml.world.2.expect index edc1d5b9bd21..cb0c4807267c 100644 --- a/pkg/front_end/testcases/incremental/no_outline_change_6.yaml.world.2.expect +++ b/pkg/front_end/testcases/incremental/no_outline_change_6.yaml.world.2.expect @@ -29,11 +29,11 @@ library from "org-dartlang-test:///main.dart" as main { } } class CompilationStrategy extends dart.core::_Enum /*isEnum*/ { - static const field dart.core::List values = #C14; enum-element static const field main::CompilationStrategy direct = #C4; enum-element static const field main::CompilationStrategy toKernel = #C7; enum-element static const field main::CompilationStrategy toData = #C10; enum-element static const field main::CompilationStrategy fromData = #C13; + static const field dart.core::List values = #C14; const synthetic constructor •(dart.core::int #index, dart.core::String #name) → main::CompilationStrategy : super dart.core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/incremental/no_outline_change_6.yaml.world.3.expect b/pkg/front_end/testcases/incremental/no_outline_change_6.yaml.world.3.expect index 83cd78a67171..7d17189d7be1 100644 --- a/pkg/front_end/testcases/incremental/no_outline_change_6.yaml.world.3.expect +++ b/pkg/front_end/testcases/incremental/no_outline_change_6.yaml.world.3.expect @@ -22,11 +22,11 @@ library from "org-dartlang-test:///main.dart" as main { } } class CompilationStrategy extends dart.core::_Enum /*isEnum*/ { - static const field dart.core::List values = #C14; enum-element static const field main::CompilationStrategy direct = #C4; enum-element static const field main::CompilationStrategy toKernel = #C7; enum-element static const field main::CompilationStrategy toData = #C10; enum-element static const field main::CompilationStrategy fromData = #C13; + static const field dart.core::List values = #C14; const synthetic constructor •(dart.core::int #index, dart.core::String #name) → main::CompilationStrategy : super dart.core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/incremental/no_outline_change_7.yaml.world.1.expect b/pkg/front_end/testcases/incremental/no_outline_change_7.yaml.world.1.expect index 93540ce8ee1e..a6251bba6b53 100644 --- a/pkg/front_end/testcases/incremental/no_outline_change_7.yaml.world.1.expect +++ b/pkg/front_end/testcases/incremental/no_outline_change_7.yaml.world.1.expect @@ -33,7 +33,6 @@ library from "org-dartlang-test:///main.dart" as main { } @#C1 class CompilationStrategy extends dart.core::_Enum /*isEnum*/ { - static const field dart.core::List values = #C15; @#C1 enum-element static const field main::CompilationStrategy direct = #C5; @#C1 @@ -42,6 +41,7 @@ library from "org-dartlang-test:///main.dart" as main { enum-element static const field main::CompilationStrategy toData = #C11; @#C1 enum-element static const field main::CompilationStrategy fromData = #C14; + static const field dart.core::List values = #C15; const synthetic constructor •(dart.core::int #index, dart.core::String #name) → main::CompilationStrategy : super dart.core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/incremental/no_outline_change_7.yaml.world.2.expect b/pkg/front_end/testcases/incremental/no_outline_change_7.yaml.world.2.expect index 93540ce8ee1e..a6251bba6b53 100644 --- a/pkg/front_end/testcases/incremental/no_outline_change_7.yaml.world.2.expect +++ b/pkg/front_end/testcases/incremental/no_outline_change_7.yaml.world.2.expect @@ -33,7 +33,6 @@ library from "org-dartlang-test:///main.dart" as main { } @#C1 class CompilationStrategy extends dart.core::_Enum /*isEnum*/ { - static const field dart.core::List values = #C15; @#C1 enum-element static const field main::CompilationStrategy direct = #C5; @#C1 @@ -42,6 +41,7 @@ library from "org-dartlang-test:///main.dart" as main { enum-element static const field main::CompilationStrategy toData = #C11; @#C1 enum-element static const field main::CompilationStrategy fromData = #C14; + static const field dart.core::List values = #C15; const synthetic constructor •(dart.core::int #index, dart.core::String #name) → main::CompilationStrategy : super dart.core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.strong.expect b/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.strong.expect index 0eeb8d1cd58a..75c1c608f5ac 100644 --- a/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.strong.expect +++ b/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.strong.expect @@ -3,8 +3,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E v1 = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.strong.modular.expect b/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.strong.modular.expect index 0eeb8d1cd58a..75c1c608f5ac 100644 --- a/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.strong.modular.expect +++ b/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.strong.modular.expect @@ -3,8 +3,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E v1 = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.strong.outline.expect b/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.strong.outline.expect index 4ad7c6196abe..7ffa31ef27f3 100644 --- a/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.strong.outline.expect +++ b/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.strong.outline.expect @@ -3,8 +3,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E::v1]; enum-element static const field self::E v1 = const self::E::•(0, "v1"); + static const field core::List values = const [self::E::v1]; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; @@ -17,6 +17,6 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///inferred_type_is_enum.dart:8:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "v1"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///inferred_type_is_enum.dart:8:10 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "v1"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///inferred_type_is_enum.dart:8:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "v1"}]) Extra constant evaluation: evaluated: 7, effectively constant: 2 diff --git a/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.strong.transformed.expect index 0eeb8d1cd58a..75c1c608f5ac 100644 --- a/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/inference/inferred_type_is_enum.dart.strong.transformed.expect @@ -3,8 +3,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E v1 = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.strong.expect b/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.strong.expect index 8d64310ad5e9..5d8eb4db33b3 100644 --- a/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.strong.expect +++ b/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.strong.expect @@ -3,8 +3,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E v1 = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.strong.modular.expect b/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.strong.modular.expect index 8d64310ad5e9..5d8eb4db33b3 100644 --- a/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.strong.modular.expect +++ b/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.strong.modular.expect @@ -3,8 +3,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E v1 = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.strong.outline.expect b/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.strong.outline.expect index c9d83c83a092..5b201fcd438e 100644 --- a/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.strong.outline.expect +++ b/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.strong.outline.expect @@ -3,8 +3,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E::v1]; enum-element static const field self::E v1 = const self::E::•(0, "v1"); + static const field core::List values = const [self::E::v1]; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; @@ -17,6 +17,6 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///inferred_type_is_enum_values.dart:8:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "v1"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///inferred_type_is_enum_values.dart:8:10 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "v1"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///inferred_type_is_enum_values.dart:8:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "v1"}]) Extra constant evaluation: evaluated: 7, effectively constant: 2 diff --git a/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.strong.transformed.expect index 8d64310ad5e9..5d8eb4db33b3 100644 --- a/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart.strong.transformed.expect @@ -3,8 +3,8 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C4; enum-element static const field self::E v1 = #C3; + static const field core::List values = #C4; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/nnbd/return_null.dart.strong.expect b/pkg/front_end/testcases/nnbd/return_null.dart.strong.expect index bb6305e0e4b3..d2cf0b593ccc 100644 --- a/pkg/front_end/testcases/nnbd/return_null.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/return_null.dart.strong.expect @@ -59,9 +59,9 @@ import "dart:async" as asy; import "dart:async"; class Enum extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::Enum a = #C3; enum-element static const field self::Enum b = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::Enum : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/nnbd/return_null.dart.strong.modular.expect b/pkg/front_end/testcases/nnbd/return_null.dart.strong.modular.expect index bb6305e0e4b3..d2cf0b593ccc 100644 --- a/pkg/front_end/testcases/nnbd/return_null.dart.strong.modular.expect +++ b/pkg/front_end/testcases/nnbd/return_null.dart.strong.modular.expect @@ -59,9 +59,9 @@ import "dart:async" as asy; import "dart:async"; class Enum extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::Enum a = #C3; enum-element static const field self::Enum b = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::Enum : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/nnbd/return_null.dart.strong.outline.expect b/pkg/front_end/testcases/nnbd/return_null.dart.strong.outline.expect index bc8c601afda1..18bda7acd676 100644 --- a/pkg/front_end/testcases/nnbd/return_null.dart.strong.outline.expect +++ b/pkg/front_end/testcases/nnbd/return_null.dart.strong.outline.expect @@ -6,9 +6,9 @@ import "dart:async" as asy; import "dart:async"; class Enum extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::Enum::a, self::Enum::b]; enum-element static const field self::Enum a = const self::Enum::•(0, "a"); enum-element static const field self::Enum b = const self::Enum::•(1, "b"); + static const field core::List values = const [self::Enum::a, self::Enum::b]; const synthetic constructor •(core::int #index, core::String #name) → self::Enum : super core::_Enum::•(#index, #name) ; @@ -50,7 +50,7 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///return_null.dart:43:6 -> ListConstant(const [const Enum{_Enum.index: 0, _Enum._name: "a"}, const Enum{_Enum.index: 1, _Enum._name: "b"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///return_null.dart:43:13 -> InstanceConstant(const Enum{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///return_null.dart:43:16 -> InstanceConstant(const Enum{_Enum.index: 1, _Enum._name: "b"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///return_null.dart:43:6 -> ListConstant(const [const Enum{_Enum.index: 0, _Enum._name: "a"}, const Enum{_Enum.index: 1, _Enum._name: "b"}]) Extra constant evaluation: evaluated: 8, effectively constant: 3 diff --git a/pkg/front_end/testcases/nnbd/return_null.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/return_null.dart.strong.transformed.expect index 581091dae712..1ffb400e1229 100644 --- a/pkg/front_end/testcases/nnbd/return_null.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/return_null.dart.strong.transformed.expect @@ -59,9 +59,9 @@ import "dart:async" as asy; import "dart:async"; class Enum extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::Enum a = #C3; enum-element static const field self::Enum b = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::Enum : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.expect b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.expect index 5cfe49836cab..cba67fe5d977 100644 --- a/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.expect +++ b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.expect @@ -10,9 +10,9 @@ import self as self; import "dart:core" as core; class Enum extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::Enum e1 = #C3; enum-element static const field self::Enum e2 = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::Enum : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.modular.expect b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.modular.expect index 5cfe49836cab..cba67fe5d977 100644 --- a/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.modular.expect +++ b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.modular.expect @@ -10,9 +10,9 @@ import self as self; import "dart:core" as core; class Enum extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::Enum e1 = #C3; enum-element static const field self::Enum e2 = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::Enum : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.outline.expect b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.outline.expect index 7e604976c7dd..3857badea630 100644 --- a/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.outline.expect +++ b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.outline.expect @@ -3,9 +3,9 @@ import self as self; import "dart:core" as core; class Enum extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::Enum::e1, self::Enum::e2]; enum-element static const field self::Enum e1 = const self::Enum::•(0, "e1"); enum-element static const field self::Enum e2 = const self::Enum::•(1, "e2"); + static const field core::List values = const [self::Enum::e1, self::Enum::e2]; const synthetic constructor •(core::int #index, core::String #name) → self::Enum : super core::_Enum::•(#index, #name) ; @@ -29,7 +29,7 @@ static method expect(dynamic expected, dynamic actual) → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///switch_nullable_enum.dart:7:6 -> ListConstant(const [const Enum{_Enum.index: 0, _Enum._name: "e1"}, const Enum{_Enum.index: 1, _Enum._name: "e2"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///switch_nullable_enum.dart:7:13 -> InstanceConstant(const Enum{_Enum.index: 0, _Enum._name: "e1"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///switch_nullable_enum.dart:7:17 -> InstanceConstant(const Enum{_Enum.index: 1, _Enum._name: "e2"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///switch_nullable_enum.dart:7:6 -> ListConstant(const [const Enum{_Enum.index: 0, _Enum._name: "e1"}, const Enum{_Enum.index: 1, _Enum._name: "e2"}]) Extra constant evaluation: evaluated: 8, effectively constant: 3 diff --git a/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.transformed.expect index 5cfe49836cab..cba67fe5d977 100644 --- a/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/nnbd/switch_nullable_enum.dart.strong.transformed.expect @@ -10,9 +10,9 @@ import self as self; import "dart:core" as core; class Enum extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::Enum e1 = #C3; enum-element static const field self::Enum e2 = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::Enum : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/offsets/switch_encoding.dart.strong.expect b/pkg/front_end/testcases/offsets/switch_encoding.dart.strong.expect index 3c1166368bdf..54c713b28925 100644 --- a/pkg/front_end/testcases/offsets/switch_encoding.dart.strong.expect +++ b/pkg/front_end/testcases/offsets/switch_encoding.dart.strong.expect @@ -3,10 +3,10 @@ import self as self; import "dart:core" as core; [222]class E extends core::_Enum /*isEnum*/ { -[222] static const field core::List values = [-1] [-1] #C10; [226] enum-element static const field self::E a = [226] [226] #C3; [229] enum-element static const field self::E b = [229] [229] #C6; [232] enum-element static const field self::E c = [232] [232] #C9; +[222] static const field core::List values = [-1] [-1] #C10; [222] const synthetic constructor •([222] core::int #index, [222] core::String #name) → self::E : [222] super core::_Enum::• [222]([-1] #index, [-1] #name) [-1] ; diff --git a/pkg/front_end/testcases/offsets/switch_encoding.dart.strong.modular.expect b/pkg/front_end/testcases/offsets/switch_encoding.dart.strong.modular.expect index 3c1166368bdf..54c713b28925 100644 --- a/pkg/front_end/testcases/offsets/switch_encoding.dart.strong.modular.expect +++ b/pkg/front_end/testcases/offsets/switch_encoding.dart.strong.modular.expect @@ -3,10 +3,10 @@ import self as self; import "dart:core" as core; [222]class E extends core::_Enum /*isEnum*/ { -[222] static const field core::List values = [-1] [-1] #C10; [226] enum-element static const field self::E a = [226] [226] #C3; [229] enum-element static const field self::E b = [229] [229] #C6; [232] enum-element static const field self::E c = [232] [232] #C9; +[222] static const field core::List values = [-1] [-1] #C10; [222] const synthetic constructor •([222] core::int #index, [222] core::String #name) → self::E : [222] super core::_Enum::• [222]([-1] #index, [-1] #name) [-1] ; diff --git a/pkg/front_end/testcases/offsets/switch_encoding.dart.strong.outline.expect b/pkg/front_end/testcases/offsets/switch_encoding.dart.strong.outline.expect index c13f82164092..32be7bc6d1be 100644 --- a/pkg/front_end/testcases/offsets/switch_encoding.dart.strong.outline.expect +++ b/pkg/front_end/testcases/offsets/switch_encoding.dart.strong.outline.expect @@ -3,10 +3,10 @@ import self as self; import "dart:core" as core; [222]class E extends core::_Enum /*isEnum*/ { -[222] static const field core::List values = [-1] [-1] const [[-1] self::E::a, [-1] self::E::b, [-1] self::E::c]; [226] enum-element static const field self::E a = [226] [226] const self::E::• [-1]([-1] 0, [-1] "a"); [229] enum-element static const field self::E b = [229] [229] const self::E::• [-1]([-1] 1, [-1] "b"); [232] enum-element static const field self::E c = [232] [232] const self::E::• [-1]([-1] 2, [-1] "c"); +[222] static const field core::List values = [-1] [-1] const [[-1] self::E::a, [-1] self::E::b, [-1] self::E::c]; [222] const synthetic constructor •([222] core::int #index, [222] core::String #name) → self::E : [222] super core::_Enum::• [222]([-1] #index, [-1] #name) [-1] ; @@ -66,8 +66,8 @@ import "dart:core" as core; Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///switch_encoding.dart:5:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "a"}, const E{_Enum.index: 1, _Enum._name: "b"}, const E{_Enum.index: 2, _Enum._name: "c"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///switch_encoding.dart:5:10 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///switch_encoding.dart:5:13 -> InstanceConstant(const E{_Enum.index: 1, _Enum._name: "b"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///switch_encoding.dart:5:16 -> InstanceConstant(const E{_Enum.index: 2, _Enum._name: "c"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///switch_encoding.dart:5:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "a"}, const E{_Enum.index: 1, _Enum._name: "b"}, const E{_Enum.index: 2, _Enum._name: "c"}]) Extra constant evaluation: evaluated: 11, effectively constant: 4 diff --git a/pkg/front_end/testcases/offsets/switch_encoding.dart.strong.transformed.expect b/pkg/front_end/testcases/offsets/switch_encoding.dart.strong.transformed.expect index 8c3b1144b4d3..15f57adbed9b 100644 --- a/pkg/front_end/testcases/offsets/switch_encoding.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/offsets/switch_encoding.dart.strong.transformed.expect @@ -3,10 +3,10 @@ import self as self; import "dart:core" as core; [222]class E extends core::_Enum /*isEnum*/ { -[222] static const field core::List values = [-1] [-1] #C10; [226] enum-element static const field self::E a = [226] [226] #C3; [229] enum-element static const field self::E b = [229] [229] #C6; [232] enum-element static const field self::E c = [232] [232] #C9; +[222] static const field core::List values = [-1] [-1] #C10; [222] const synthetic constructor •([222] core::int #index, [222] core::String #name) → self::E : [222] super core::_Enum::• [222]([-1] #index, [-1] #name) [-1] ; diff --git a/pkg/front_end/testcases/patterns/exhaustiveness/enum_switch.dart.strong.expect b/pkg/front_end/testcases/patterns/exhaustiveness/enum_switch.dart.strong.expect index f895343e296c..f4053db9881c 100644 --- a/pkg/front_end/testcases/patterns/exhaustiveness/enum_switch.dart.strong.expect +++ b/pkg/front_end/testcases/patterns/exhaustiveness/enum_switch.dart.strong.expect @@ -48,10 +48,10 @@ import self as self; import "dart:core" as core; class Enum extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::Enum a = #C3; enum-element static const field self::Enum b = #C6; enum-element static const field self::Enum c = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::Enum : super core::_Enum::•(#index, #name) ; @@ -59,10 +59,10 @@ class Enum extends core::_Enum /*isEnum*/ { return "Enum.${this.{core::_Enum::_name}{core::String}}"; } class GenericEnum extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C14; enum-element static const field self::GenericEnum a = #C11; enum-element static const field self::GenericEnum b = #C12; enum-element static const field self::GenericEnum c = #C13; + static const field core::List> values = #C14; const synthetic constructor •(core::int #index, core::String #name) → self::GenericEnum : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/patterns/exhaustiveness/enum_switch.dart.strong.modular.expect b/pkg/front_end/testcases/patterns/exhaustiveness/enum_switch.dart.strong.modular.expect index f895343e296c..f4053db9881c 100644 --- a/pkg/front_end/testcases/patterns/exhaustiveness/enum_switch.dart.strong.modular.expect +++ b/pkg/front_end/testcases/patterns/exhaustiveness/enum_switch.dart.strong.modular.expect @@ -48,10 +48,10 @@ import self as self; import "dart:core" as core; class Enum extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::Enum a = #C3; enum-element static const field self::Enum b = #C6; enum-element static const field self::Enum c = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::Enum : super core::_Enum::•(#index, #name) ; @@ -59,10 +59,10 @@ class Enum extends core::_Enum /*isEnum*/ { return "Enum.${this.{core::_Enum::_name}{core::String}}"; } class GenericEnum extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C14; enum-element static const field self::GenericEnum a = #C11; enum-element static const field self::GenericEnum b = #C12; enum-element static const field self::GenericEnum c = #C13; + static const field core::List> values = #C14; const synthetic constructor •(core::int #index, core::String #name) → self::GenericEnum : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/patterns/exhaustiveness/enum_switch.dart.strong.outline.expect b/pkg/front_end/testcases/patterns/exhaustiveness/enum_switch.dart.strong.outline.expect index 5f302c87b566..724d1b13aab4 100644 --- a/pkg/front_end/testcases/patterns/exhaustiveness/enum_switch.dart.strong.outline.expect +++ b/pkg/front_end/testcases/patterns/exhaustiveness/enum_switch.dart.strong.outline.expect @@ -3,10 +3,10 @@ import self as self; import "dart:core" as core; class Enum extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::Enum::a, self::Enum::b, self::Enum::c]; enum-element static const field self::Enum a = const self::Enum::•(0, "a"); enum-element static const field self::Enum b = const self::Enum::•(1, "b"); enum-element static const field self::Enum c = const self::Enum::•(2, "c"); + static const field core::List values = const [self::Enum::a, self::Enum::b, self::Enum::c]; const synthetic constructor •(core::int #index, core::String #name) → self::Enum : super core::_Enum::•(#index, #name) ; @@ -14,10 +14,10 @@ class Enum extends core::_Enum /*isEnum*/ { return "Enum.${this.{core::_Enum::_name}{core::String}}"; } class GenericEnum extends core::_Enum /*isEnum*/ { - static const field core::List> values = const >[self::GenericEnum::a, self::GenericEnum::b, self::GenericEnum::c]; enum-element static const field self::GenericEnum a = const self::GenericEnum::•(0, "a"); enum-element static const field self::GenericEnum b = const self::GenericEnum::•(1, "b"); enum-element static const field self::GenericEnum c = const self::GenericEnum::•(2, "c"); + static const field core::List> values = const >[self::GenericEnum::a, self::GenericEnum::b, self::GenericEnum::c]; const synthetic constructor •(core::int #index, core::String #name) → self::GenericEnum : super core::_Enum::•(#index, #name) ; @@ -57,12 +57,12 @@ static method exhaustiveGenericSwitchTyped(self::GenericEnum e) → v Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///enum_switch.dart:5:6 -> ListConstant(const [const Enum{_Enum.index: 0, _Enum._name: "a"}, const Enum{_Enum.index: 1, _Enum._name: "b"}, const Enum{_Enum.index: 2, _Enum._name: "c"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum_switch.dart:5:13 -> InstanceConstant(const Enum{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum_switch.dart:5:16 -> InstanceConstant(const Enum{_Enum.index: 1, _Enum._name: "b"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum_switch.dart:5:19 -> InstanceConstant(const Enum{_Enum.index: 2, _Enum._name: "c"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///enum_switch.dart:187:6 -> ListConstant(const >[const GenericEnum{_Enum.index: 0, _Enum._name: "a"}, const GenericEnum{_Enum.index: 1, _Enum._name: "b"}, const GenericEnum{_Enum.index: 2, _Enum._name: "c"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///enum_switch.dart:5:6 -> ListConstant(const [const Enum{_Enum.index: 0, _Enum._name: "a"}, const Enum{_Enum.index: 1, _Enum._name: "b"}, const Enum{_Enum.index: 2, _Enum._name: "c"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum_switch.dart:188:3 -> InstanceConstant(const GenericEnum{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum_switch.dart:189:3 -> InstanceConstant(const GenericEnum{_Enum.index: 1, _Enum._name: "b"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum_switch.dart:190:3 -> InstanceConstant(const GenericEnum{_Enum.index: 2, _Enum._name: "c"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///enum_switch.dart:187:6 -> ListConstant(const >[const GenericEnum{_Enum.index: 0, _Enum._name: "a"}, const GenericEnum{_Enum.index: 1, _Enum._name: "b"}, const GenericEnum{_Enum.index: 2, _Enum._name: "c"}]) Extra constant evaluation: evaluated: 18, effectively constant: 8 diff --git a/pkg/front_end/testcases/patterns/exhaustiveness/enum_switch.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/exhaustiveness/enum_switch.dart.strong.transformed.expect index f895343e296c..f4053db9881c 100644 --- a/pkg/front_end/testcases/patterns/exhaustiveness/enum_switch.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/patterns/exhaustiveness/enum_switch.dart.strong.transformed.expect @@ -48,10 +48,10 @@ import self as self; import "dart:core" as core; class Enum extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::Enum a = #C3; enum-element static const field self::Enum b = #C6; enum-element static const field self::Enum c = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::Enum : super core::_Enum::•(#index, #name) ; @@ -59,10 +59,10 @@ class Enum extends core::_Enum /*isEnum*/ { return "Enum.${this.{core::_Enum::_name}{core::String}}"; } class GenericEnum extends core::_Enum /*isEnum*/ { - static const field core::List> values = #C14; enum-element static const field self::GenericEnum a = #C11; enum-element static const field self::GenericEnum b = #C12; enum-element static const field self::GenericEnum c = #C13; + static const field core::List> values = #C14; const synthetic constructor •(core::int #index, core::String #name) → self::GenericEnum : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/patterns/issue51716/main.dart.strong.expect b/pkg/front_end/testcases/patterns/issue51716/main.dart.strong.expect index d5b1e9ced26d..d3cd25c9a2de 100644 --- a/pkg/front_end/testcases/patterns/issue51716/main.dart.strong.expect +++ b/pkg/front_end/testcases/patterns/issue51716/main.dart.strong.expect @@ -8,9 +8,9 @@ import "org-dartlang-testcase:///main_lib1.dart"; import "org-dartlang-testcase:///main_lib2.dart"; class Main1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::Main1 a = #C3; enum-element static const field self::Main1 b = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::Main1 : super core::_Enum::•(#index, #name) ; @@ -18,9 +18,9 @@ class Main1 extends core::_Enum /*isEnum*/ { return "Main1.${this.{core::_Enum::_name}{core::String}}"; } class Main2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::Main2 a = #C8; enum-element static const field self::Main2 b = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::Main2 : super core::_Enum::•(#index, #name) ; @@ -149,9 +149,9 @@ import "org-dartlang-testcase:///main.dart"; import "org-dartlang-testcase:///main_lib2.dart"; class Lib1a extends core::_Enum /*isEnum*/ { - static const field core::List values = #C17; enum-element static const field mai::Lib1a a = #C11; enum-element static const field mai::Lib1a b = #C12; + static const field core::List values = #C17; const synthetic constructor •(core::int #index, core::String #name) → mai::Lib1a : super core::_Enum::•(#index, #name) ; @@ -159,9 +159,9 @@ class Lib1a extends core::_Enum /*isEnum*/ { return "Lib1a.${this.{core::_Enum::_name}{core::String}}"; } class Lib1b extends core::_Enum /*isEnum*/ { - static const field core::List values = #C18; enum-element static const field mai::Lib1b a = #C13; enum-element static const field mai::Lib1b b = #C14; + static const field core::List values = #C18; const synthetic constructor •(core::int #index, core::String #name) → mai::Lib1b : super core::_Enum::•(#index, #name) ; @@ -285,9 +285,9 @@ import self as mai2; import "dart:core" as core; class Lib2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field mai2::Lib2 a = #C15; enum-element static const field mai2::Lib2 b = #C16; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → mai2::Lib2 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/patterns/issue51716/main.dart.strong.modular.expect b/pkg/front_end/testcases/patterns/issue51716/main.dart.strong.modular.expect index 479244750660..d98f6b04295a 100644 --- a/pkg/front_end/testcases/patterns/issue51716/main.dart.strong.modular.expect +++ b/pkg/front_end/testcases/patterns/issue51716/main.dart.strong.modular.expect @@ -8,9 +8,9 @@ import "org-dartlang-testcase:///main_lib1.dart"; import "org-dartlang-testcase:///main_lib2.dart"; class Main1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::Main1 a = #C3; enum-element static const field self::Main1 b = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::Main1 : super core::_Enum::•(#index, #name) ; @@ -18,9 +18,9 @@ class Main1 extends core::_Enum /*isEnum*/ { return "Main1.${this.{core::_Enum::_name}{core::String}}"; } class Main2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::Main2 a = #C8; enum-element static const field self::Main2 b = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::Main2 : super core::_Enum::•(#index, #name) ; @@ -149,9 +149,9 @@ import "org-dartlang-testcase:///main.dart"; import "org-dartlang-testcase:///main_lib2.dart"; class Lib1a extends core::_Enum /*isEnum*/ { - static const field core::List values = #C17; enum-element static const field mai::Lib1a a = #C11; enum-element static const field mai::Lib1a b = #C12; + static const field core::List values = #C17; const synthetic constructor •(core::int #index, core::String #name) → mai::Lib1a : super core::_Enum::•(#index, #name) ; @@ -159,9 +159,9 @@ class Lib1a extends core::_Enum /*isEnum*/ { return "Lib1a.${this.{core::_Enum::_name}{core::String}}"; } class Lib1b extends core::_Enum /*isEnum*/ { - static const field core::List values = #C18; enum-element static const field mai::Lib1b a = #C13; enum-element static const field mai::Lib1b b = #C14; + static const field core::List values = #C18; const synthetic constructor •(core::int #index, core::String #name) → mai::Lib1b : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/patterns/issue51716/main.dart.strong.outline.expect b/pkg/front_end/testcases/patterns/issue51716/main.dart.strong.outline.expect index 649eb50c4af9..f2a39358fe22 100644 --- a/pkg/front_end/testcases/patterns/issue51716/main.dart.strong.outline.expect +++ b/pkg/front_end/testcases/patterns/issue51716/main.dart.strong.outline.expect @@ -8,9 +8,9 @@ import "org-dartlang-testcase:///main_lib1.dart"; import "org-dartlang-testcase:///main_lib2.dart"; class Main1 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::Main1::a, self::Main1::b]; enum-element static const field self::Main1 a = const self::Main1::•(0, "a"); enum-element static const field self::Main1 b = const self::Main1::•(1, "b"); + static const field core::List values = const [self::Main1::a, self::Main1::b]; const synthetic constructor •(core::int #index, core::String #name) → self::Main1 : super core::_Enum::•(#index, #name) ; @@ -18,9 +18,9 @@ class Main1 extends core::_Enum /*isEnum*/ { return "Main1.${this.{core::_Enum::_name}{core::String}}"; } class Main2 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::Main2::a, self::Main2::b]; enum-element static const field self::Main2 a = const self::Main2::•(0, "a"); enum-element static const field self::Main2 b = const self::Main2::•(1, "b"); + static const field core::List values = const [self::Main2::a, self::Main2::b]; const synthetic constructor •(core::int #index, core::String #name) → self::Main2 : super core::_Enum::•(#index, #name) ; @@ -44,9 +44,9 @@ import "org-dartlang-testcase:///main.dart"; import "org-dartlang-testcase:///main_lib2.dart"; class Lib1a extends core::_Enum /*isEnum*/ { - static const field core::List values = const [mai::Lib1a::a, mai::Lib1a::b]; enum-element static const field mai::Lib1a a = const mai::Lib1a::•(0, "a"); enum-element static const field mai::Lib1a b = const mai::Lib1a::•(1, "b"); + static const field core::List values = const [mai::Lib1a::a, mai::Lib1a::b]; const synthetic constructor •(core::int #index, core::String #name) → mai::Lib1a : super core::_Enum::•(#index, #name) ; @@ -54,9 +54,9 @@ class Lib1a extends core::_Enum /*isEnum*/ { return "Lib1a.${this.{core::_Enum::_name}{core::String}}"; } class Lib1b extends core::_Enum /*isEnum*/ { - static const field core::List values = const [mai::Lib1b::a, mai::Lib1b::b]; enum-element static const field mai::Lib1b a = const mai::Lib1b::•(0, "a"); enum-element static const field mai::Lib1b b = const mai::Lib1b::•(1, "b"); + static const field core::List values = const [mai::Lib1b::a, mai::Lib1b::b]; const synthetic constructor •(core::int #index, core::String #name) → mai::Lib1b : super core::_Enum::•(#index, #name) ; @@ -75,9 +75,9 @@ import self as mai2; import "dart:core" as core; class Lib2 extends core::_Enum /*isEnum*/ { - static const field core::List values = const [mai2::Lib2::a, mai2::Lib2::b]; enum-element static const field mai2::Lib2 a = const mai2::Lib2::•(0, "a"); enum-element static const field mai2::Lib2 b = const mai2::Lib2::•(1, "b"); + static const field core::List values = const [mai2::Lib2::a, mai2::Lib2::b]; const synthetic constructor •(core::int #index, core::String #name) → mai2::Lib2 : super core::_Enum::•(#index, #name) ; @@ -87,19 +87,19 @@ class Lib2 extends core::_Enum /*isEnum*/ { Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///main.dart:31:6 -> ListConstant(const [const Main1{_Enum.index: 0, _Enum._name: "a"}, const Main1{_Enum.index: 1, _Enum._name: "b"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main.dart:32:3 -> InstanceConstant(const Main1{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main.dart:33:3 -> InstanceConstant(const Main1{_Enum.index: 1, _Enum._name: "b"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///main.dart:59:6 -> ListConstant(const [const Main2{_Enum.index: 0, _Enum._name: "a"}, const Main2{_Enum.index: 1, _Enum._name: "b"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///main.dart:31:6 -> ListConstant(const [const Main1{_Enum.index: 0, _Enum._name: "a"}, const Main1{_Enum.index: 1, _Enum._name: "b"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main.dart:60:3 -> InstanceConstant(const Main2{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main.dart:61:3 -> InstanceConstant(const Main2{_Enum.index: 1, _Enum._name: "b"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///main_lib1.dart:31:6 -> ListConstant(const [const Lib1a{_Enum.index: 0, _Enum._name: "a"}, const Lib1a{_Enum.index: 1, _Enum._name: "b"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///main.dart:59:6 -> ListConstant(const [const Main2{_Enum.index: 0, _Enum._name: "a"}, const Main2{_Enum.index: 1, _Enum._name: "b"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main_lib1.dart:32:3 -> InstanceConstant(const Lib1a{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main_lib1.dart:33:3 -> InstanceConstant(const Lib1a{_Enum.index: 1, _Enum._name: "b"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///main_lib1.dart:59:6 -> ListConstant(const [const Lib1b{_Enum.index: 0, _Enum._name: "a"}, const Lib1b{_Enum.index: 1, _Enum._name: "b"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///main_lib1.dart:31:6 -> ListConstant(const [const Lib1a{_Enum.index: 0, _Enum._name: "a"}, const Lib1a{_Enum.index: 1, _Enum._name: "b"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main_lib1.dart:60:3 -> InstanceConstant(const Lib1b{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main_lib1.dart:61:3 -> InstanceConstant(const Lib1b{_Enum.index: 1, _Enum._name: "b"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///main_lib2.dart:5:6 -> ListConstant(const [const Lib2{_Enum.index: 0, _Enum._name: "a"}, const Lib2{_Enum.index: 1, _Enum._name: "b"}]) +Evaluated: ListLiteral @ org-dartlang-testcase:///main_lib1.dart:59:6 -> ListConstant(const [const Lib1b{_Enum.index: 0, _Enum._name: "a"}, const Lib1b{_Enum.index: 1, _Enum._name: "b"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main_lib2.dart:6:3 -> InstanceConstant(const Lib2{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///main_lib2.dart:7:3 -> InstanceConstant(const Lib2{_Enum.index: 1, _Enum._name: "b"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///main_lib2.dart:5:6 -> ListConstant(const [const Lib2{_Enum.index: 0, _Enum._name: "a"}, const Lib2{_Enum.index: 1, _Enum._name: "b"}]) Extra constant evaluation: evaluated: 40, effectively constant: 15 diff --git a/pkg/front_end/testcases/patterns/issue51716/main.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/issue51716/main.dart.strong.transformed.expect index d5b1e9ced26d..d3cd25c9a2de 100644 --- a/pkg/front_end/testcases/patterns/issue51716/main.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/patterns/issue51716/main.dart.strong.transformed.expect @@ -8,9 +8,9 @@ import "org-dartlang-testcase:///main_lib1.dart"; import "org-dartlang-testcase:///main_lib2.dart"; class Main1 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::Main1 a = #C3; enum-element static const field self::Main1 b = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::Main1 : super core::_Enum::•(#index, #name) ; @@ -18,9 +18,9 @@ class Main1 extends core::_Enum /*isEnum*/ { return "Main1.${this.{core::_Enum::_name}{core::String}}"; } class Main2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::Main2 a = #C8; enum-element static const field self::Main2 b = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::Main2 : super core::_Enum::•(#index, #name) ; @@ -149,9 +149,9 @@ import "org-dartlang-testcase:///main.dart"; import "org-dartlang-testcase:///main_lib2.dart"; class Lib1a extends core::_Enum /*isEnum*/ { - static const field core::List values = #C17; enum-element static const field mai::Lib1a a = #C11; enum-element static const field mai::Lib1a b = #C12; + static const field core::List values = #C17; const synthetic constructor •(core::int #index, core::String #name) → mai::Lib1a : super core::_Enum::•(#index, #name) ; @@ -159,9 +159,9 @@ class Lib1a extends core::_Enum /*isEnum*/ { return "Lib1a.${this.{core::_Enum::_name}{core::String}}"; } class Lib1b extends core::_Enum /*isEnum*/ { - static const field core::List values = #C18; enum-element static const field mai::Lib1b a = #C13; enum-element static const field mai::Lib1b b = #C14; + static const field core::List values = #C18; const synthetic constructor •(core::int #index, core::String #name) → mai::Lib1b : super core::_Enum::•(#index, #name) ; @@ -285,9 +285,9 @@ import self as mai2; import "dart:core" as core; class Lib2 extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field mai2::Lib2 a = #C15; enum-element static const field mai2::Lib2 b = #C16; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → mai2::Lib2 : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/patterns/issue51800.dart.strong.expect b/pkg/front_end/testcases/patterns/issue51800.dart.strong.expect index eefef85ff06a..74a2fa713955 100644 --- a/pkg/front_end/testcases/patterns/issue51800.dart.strong.expect +++ b/pkg/front_end/testcases/patterns/issue51800.dart.strong.expect @@ -9,12 +9,12 @@ class ExpansionTile extends core::Object /*hasConstConstructor*/ { ; } class CrossAxisAlignment extends core::_Enum /*isEnum*/ { - static const field core::List values = #C17; enum-element static const field self::CrossAxisAlignment start = #C7; enum-element static const field self::CrossAxisAlignment end = #C10; enum-element static const field self::CrossAxisAlignment center = #C13; enum-element static const field self::CrossAxisAlignment stretch = #C16; enum-element static const field self::CrossAxisAlignment baseline = #C4; + static const field core::List values = #C17; const synthetic constructor •(core::int #index, core::String #name) → self::CrossAxisAlignment : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/patterns/issue51800.dart.strong.modular.expect b/pkg/front_end/testcases/patterns/issue51800.dart.strong.modular.expect index eefef85ff06a..74a2fa713955 100644 --- a/pkg/front_end/testcases/patterns/issue51800.dart.strong.modular.expect +++ b/pkg/front_end/testcases/patterns/issue51800.dart.strong.modular.expect @@ -9,12 +9,12 @@ class ExpansionTile extends core::Object /*hasConstConstructor*/ { ; } class CrossAxisAlignment extends core::_Enum /*isEnum*/ { - static const field core::List values = #C17; enum-element static const field self::CrossAxisAlignment start = #C7; enum-element static const field self::CrossAxisAlignment end = #C10; enum-element static const field self::CrossAxisAlignment center = #C13; enum-element static const field self::CrossAxisAlignment stretch = #C16; enum-element static const field self::CrossAxisAlignment baseline = #C4; + static const field core::List values = #C17; const synthetic constructor •(core::int #index, core::String #name) → self::CrossAxisAlignment : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/patterns/issue51800.dart.strong.outline.expect b/pkg/front_end/testcases/patterns/issue51800.dart.strong.outline.expect index a4ac20882142..a2098d60bb32 100644 --- a/pkg/front_end/testcases/patterns/issue51800.dart.strong.outline.expect +++ b/pkg/front_end/testcases/patterns/issue51800.dart.strong.outline.expect @@ -9,12 +9,12 @@ class ExpansionTile extends core::Object /*hasConstConstructor*/ { ; } class CrossAxisAlignment extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::CrossAxisAlignment::start, self::CrossAxisAlignment::end, self::CrossAxisAlignment::center, self::CrossAxisAlignment::stretch, self::CrossAxisAlignment::baseline]; enum-element static const field self::CrossAxisAlignment start = const self::CrossAxisAlignment::•(0, "start"); enum-element static const field self::CrossAxisAlignment end = const self::CrossAxisAlignment::•(1, "end"); enum-element static const field self::CrossAxisAlignment center = const self::CrossAxisAlignment::•(2, "center"); enum-element static const field self::CrossAxisAlignment stretch = const self::CrossAxisAlignment::•(3, "stretch"); enum-element static const field self::CrossAxisAlignment baseline = const self::CrossAxisAlignment::•(4, "baseline"); + static const field core::List values = const [self::CrossAxisAlignment::start, self::CrossAxisAlignment::end, self::CrossAxisAlignment::center, self::CrossAxisAlignment::stretch, self::CrossAxisAlignment::baseline]; const synthetic constructor •(core::int #index, core::String #name) → self::CrossAxisAlignment : super core::_Enum::•(#index, #name) ; @@ -27,10 +27,10 @@ static method main() → void Extra constant evaluation status: Evaluated: StaticGet @ org-dartlang-testcase:///issue51800.dart:8:64 -> InstanceConstant(const CrossAxisAlignment{_Enum.index: 4, _Enum._name: "baseline"}) -Evaluated: ListLiteral @ org-dartlang-testcase:///issue51800.dart:13:6 -> ListConstant(const [const CrossAxisAlignment{_Enum.index: 0, _Enum._name: "start"}, const CrossAxisAlignment{_Enum.index: 1, _Enum._name: "end"}, const CrossAxisAlignment{_Enum.index: 2, _Enum._name: "center"}, const CrossAxisAlignment{_Enum.index: 3, _Enum._name: "stretch"}, const CrossAxisAlignment{_Enum.index: 4, _Enum._name: "baseline"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue51800.dart:14:3 -> InstanceConstant(const CrossAxisAlignment{_Enum.index: 0, _Enum._name: "start"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue51800.dart:15:3 -> InstanceConstant(const CrossAxisAlignment{_Enum.index: 1, _Enum._name: "end"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue51800.dart:16:3 -> InstanceConstant(const CrossAxisAlignment{_Enum.index: 2, _Enum._name: "center"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue51800.dart:17:3 -> InstanceConstant(const CrossAxisAlignment{_Enum.index: 3, _Enum._name: "stretch"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///issue51800.dart:18:3 -> InstanceConstant(const CrossAxisAlignment{_Enum.index: 4, _Enum._name: "baseline"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///issue51800.dart:13:6 -> ListConstant(const [const CrossAxisAlignment{_Enum.index: 0, _Enum._name: "start"}, const CrossAxisAlignment{_Enum.index: 1, _Enum._name: "end"}, const CrossAxisAlignment{_Enum.index: 2, _Enum._name: "center"}, const CrossAxisAlignment{_Enum.index: 3, _Enum._name: "stretch"}, const CrossAxisAlignment{_Enum.index: 4, _Enum._name: "baseline"}]) Extra constant evaluation: evaluated: 16, effectively constant: 7 diff --git a/pkg/front_end/testcases/patterns/issue51800.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/issue51800.dart.strong.transformed.expect index eefef85ff06a..74a2fa713955 100644 --- a/pkg/front_end/testcases/patterns/issue51800.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/patterns/issue51800.dart.strong.transformed.expect @@ -9,12 +9,12 @@ class ExpansionTile extends core::Object /*hasConstConstructor*/ { ; } class CrossAxisAlignment extends core::_Enum /*isEnum*/ { - static const field core::List values = #C17; enum-element static const field self::CrossAxisAlignment start = #C7; enum-element static const field self::CrossAxisAlignment end = #C10; enum-element static const field self::CrossAxisAlignment center = #C13; enum-element static const field self::CrossAxisAlignment stretch = #C16; enum-element static const field self::CrossAxisAlignment baseline = #C4; + static const field core::List values = #C17; const synthetic constructor •(core::int #index, core::String #name) → self::CrossAxisAlignment : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/patterns/omitted_break.dart.strong.expect b/pkg/front_end/testcases/patterns/omitted_break.dart.strong.expect index 99d953a284a5..ecadd6a3d410 100644 --- a/pkg/front_end/testcases/patterns/omitted_break.dart.strong.expect +++ b/pkg/front_end/testcases/patterns/omitted_break.dart.strong.expect @@ -3,10 +3,10 @@ import self as self; import "dart:core" as core; class Enum extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::Enum a = #C3; enum-element static const field self::Enum b = #C6; enum-element static const field self::Enum c = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::Enum : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/patterns/omitted_break.dart.strong.modular.expect b/pkg/front_end/testcases/patterns/omitted_break.dart.strong.modular.expect index 99d953a284a5..ecadd6a3d410 100644 --- a/pkg/front_end/testcases/patterns/omitted_break.dart.strong.modular.expect +++ b/pkg/front_end/testcases/patterns/omitted_break.dart.strong.modular.expect @@ -3,10 +3,10 @@ import self as self; import "dart:core" as core; class Enum extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::Enum a = #C3; enum-element static const field self::Enum b = #C6; enum-element static const field self::Enum c = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::Enum : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/patterns/omitted_break.dart.strong.outline.expect b/pkg/front_end/testcases/patterns/omitted_break.dart.strong.outline.expect index 5d9c24503300..a817111e3717 100644 --- a/pkg/front_end/testcases/patterns/omitted_break.dart.strong.outline.expect +++ b/pkg/front_end/testcases/patterns/omitted_break.dart.strong.outline.expect @@ -3,10 +3,10 @@ import self as self; import "dart:core" as core; class Enum extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::Enum::a, self::Enum::b, self::Enum::c]; enum-element static const field self::Enum a = const self::Enum::•(0, "a"); enum-element static const field self::Enum b = const self::Enum::•(1, "b"); enum-element static const field self::Enum c = const self::Enum::•(2, "c"); + static const field core::List values = const [self::Enum::a, self::Enum::b, self::Enum::c]; const synthetic constructor •(core::int #index, core::String #name) → self::Enum : super core::_Enum::•(#index, #name) ; @@ -20,8 +20,8 @@ static method method2(self::Enum e) → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///omitted_break.dart:5:6 -> ListConstant(const [const Enum{_Enum.index: 0, _Enum._name: "a"}, const Enum{_Enum.index: 1, _Enum._name: "b"}, const Enum{_Enum.index: 2, _Enum._name: "c"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///omitted_break.dart:5:13 -> InstanceConstant(const Enum{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///omitted_break.dart:5:16 -> InstanceConstant(const Enum{_Enum.index: 1, _Enum._name: "b"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///omitted_break.dart:5:19 -> InstanceConstant(const Enum{_Enum.index: 2, _Enum._name: "c"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///omitted_break.dart:5:6 -> ListConstant(const [const Enum{_Enum.index: 0, _Enum._name: "a"}, const Enum{_Enum.index: 1, _Enum._name: "b"}, const Enum{_Enum.index: 2, _Enum._name: "c"}]) Extra constant evaluation: evaluated: 9, effectively constant: 4 diff --git a/pkg/front_end/testcases/patterns/omitted_break.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/omitted_break.dart.strong.transformed.expect index 99d953a284a5..ecadd6a3d410 100644 --- a/pkg/front_end/testcases/patterns/omitted_break.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/patterns/omitted_break.dart.strong.transformed.expect @@ -3,10 +3,10 @@ import self as self; import "dart:core" as core; class Enum extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::Enum a = #C3; enum-element static const field self::Enum b = #C6; enum-element static const field self::Enum c = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::Enum : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/patterns/switch_encoding.dart.strong.expect b/pkg/front_end/testcases/patterns/switch_encoding.dart.strong.expect index d4b7d437e3a4..fcfbdf24172f 100644 --- a/pkg/front_end/testcases/patterns/switch_encoding.dart.strong.expect +++ b/pkg/front_end/testcases/patterns/switch_encoding.dart.strong.expect @@ -3,10 +3,10 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E a = #C3; enum-element static const field self::E b = #C6; enum-element static const field self::E c = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/patterns/switch_encoding.dart.strong.modular.expect b/pkg/front_end/testcases/patterns/switch_encoding.dart.strong.modular.expect index d4b7d437e3a4..fcfbdf24172f 100644 --- a/pkg/front_end/testcases/patterns/switch_encoding.dart.strong.modular.expect +++ b/pkg/front_end/testcases/patterns/switch_encoding.dart.strong.modular.expect @@ -3,10 +3,10 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E a = #C3; enum-element static const field self::E b = #C6; enum-element static const field self::E c = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/patterns/switch_encoding.dart.strong.outline.expect b/pkg/front_end/testcases/patterns/switch_encoding.dart.strong.outline.expect index 7c5153d6c961..8c8447052297 100644 --- a/pkg/front_end/testcases/patterns/switch_encoding.dart.strong.outline.expect +++ b/pkg/front_end/testcases/patterns/switch_encoding.dart.strong.outline.expect @@ -3,10 +3,10 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::E::a, self::E::b, self::E::c]; enum-element static const field self::E a = const self::E::•(0, "a"); enum-element static const field self::E b = const self::E::•(1, "b"); enum-element static const field self::E c = const self::E::•(2, "c"); + static const field core::List values = const [self::E::a, self::E::b, self::E::c]; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; @@ -66,8 +66,8 @@ static method switchExpressionSymbol(core::Symbol s) → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///switch_encoding.dart:5:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "a"}, const E{_Enum.index: 1, _Enum._name: "b"}, const E{_Enum.index: 2, _Enum._name: "c"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///switch_encoding.dart:5:10 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///switch_encoding.dart:5:13 -> InstanceConstant(const E{_Enum.index: 1, _Enum._name: "b"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///switch_encoding.dart:5:16 -> InstanceConstant(const E{_Enum.index: 2, _Enum._name: "c"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///switch_encoding.dart:5:6 -> ListConstant(const [const E{_Enum.index: 0, _Enum._name: "a"}, const E{_Enum.index: 1, _Enum._name: "b"}, const E{_Enum.index: 2, _Enum._name: "c"}]) Extra constant evaluation: evaluated: 11, effectively constant: 4 diff --git a/pkg/front_end/testcases/patterns/switch_encoding.dart.strong.transformed.expect b/pkg/front_end/testcases/patterns/switch_encoding.dart.strong.transformed.expect index c6b7b7545e28..f2ab510dee8b 100644 --- a/pkg/front_end/testcases/patterns/switch_encoding.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/patterns/switch_encoding.dart.strong.transformed.expect @@ -3,10 +3,10 @@ import self as self; import "dart:core" as core; class E extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::E a = #C3; enum-element static const field self::E b = #C6; enum-element static const field self::E c = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::E : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/rasta/enum.dart.strong.expect b/pkg/front_end/testcases/rasta/enum.dart.strong.expect index 90a8b14bbf99..d31593f450fa 100644 --- a/pkg/front_end/testcases/rasta/enum.dart.strong.expect +++ b/pkg/front_end/testcases/rasta/enum.dart.strong.expect @@ -3,9 +3,9 @@ import self as self; import "dart:core" as core; class Foo extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::Foo ec1 = #C3; enum-element static const field self::Foo ec2 = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::Foo : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/rasta/enum.dart.strong.modular.expect b/pkg/front_end/testcases/rasta/enum.dart.strong.modular.expect index 90a8b14bbf99..d31593f450fa 100644 --- a/pkg/front_end/testcases/rasta/enum.dart.strong.modular.expect +++ b/pkg/front_end/testcases/rasta/enum.dart.strong.modular.expect @@ -3,9 +3,9 @@ import self as self; import "dart:core" as core; class Foo extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::Foo ec1 = #C3; enum-element static const field self::Foo ec2 = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::Foo : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/rasta/enum.dart.strong.outline.expect b/pkg/front_end/testcases/rasta/enum.dart.strong.outline.expect index 129a9e611ee8..ec968ac68139 100644 --- a/pkg/front_end/testcases/rasta/enum.dart.strong.outline.expect +++ b/pkg/front_end/testcases/rasta/enum.dart.strong.outline.expect @@ -3,9 +3,9 @@ import self as self; import "dart:core" as core; class Foo extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::Foo::ec1, self::Foo::ec2]; enum-element static const field self::Foo ec1 = const self::Foo::•(0, "ec1"); enum-element static const field self::Foo ec2 = const self::Foo::•(1, "ec2"); + static const field core::List values = const [self::Foo::ec1, self::Foo::ec2]; const synthetic constructor •(core::int #index, core::String #name) → self::Foo : super core::_Enum::•(#index, #name) ; @@ -17,7 +17,7 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///enum.dart:5:6 -> ListConstant(const [const Foo{_Enum.index: 0, _Enum._name: "ec1"}, const Foo{_Enum.index: 1, _Enum._name: "ec2"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum.dart:6:3 -> InstanceConstant(const Foo{_Enum.index: 0, _Enum._name: "ec1"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum.dart:7:3 -> InstanceConstant(const Foo{_Enum.index: 1, _Enum._name: "ec2"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///enum.dart:5:6 -> ListConstant(const [const Foo{_Enum.index: 0, _Enum._name: "ec1"}, const Foo{_Enum.index: 1, _Enum._name: "ec2"}]) Extra constant evaluation: evaluated: 8, effectively constant: 3 diff --git a/pkg/front_end/testcases/rasta/enum.dart.strong.transformed.expect b/pkg/front_end/testcases/rasta/enum.dart.strong.transformed.expect index 90a8b14bbf99..d31593f450fa 100644 --- a/pkg/front_end/testcases/rasta/enum.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/rasta/enum.dart.strong.transformed.expect @@ -3,9 +3,9 @@ import self as self; import "dart:core" as core; class Foo extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::Foo ec1 = #C3; enum-element static const field self::Foo ec2 = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::Foo : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/regress/duplicate_enum_constructor.dart.strong.expect b/pkg/front_end/testcases/regress/duplicate_enum_constructor.dart.strong.expect index 7d436caa6887..5d18bb160bf2 100644 --- a/pkg/front_end/testcases/regress/duplicate_enum_constructor.dart.strong.expect +++ b/pkg/front_end/testcases/regress/duplicate_enum_constructor.dart.strong.expect @@ -13,9 +13,9 @@ import self as self; import "dart:core" as core; class Foo extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::Foo a = #C3; enum-element static const field self::Foo b = #C6; + static const field core::List values = #C7; const constructor •(core::int #index, core::String #name) → self::Foo : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/regress/duplicate_enum_constructor.dart.strong.modular.expect b/pkg/front_end/testcases/regress/duplicate_enum_constructor.dart.strong.modular.expect index 7d436caa6887..5d18bb160bf2 100644 --- a/pkg/front_end/testcases/regress/duplicate_enum_constructor.dart.strong.modular.expect +++ b/pkg/front_end/testcases/regress/duplicate_enum_constructor.dart.strong.modular.expect @@ -13,9 +13,9 @@ import self as self; import "dart:core" as core; class Foo extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::Foo a = #C3; enum-element static const field self::Foo b = #C6; + static const field core::List values = #C7; const constructor •(core::int #index, core::String #name) → self::Foo : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/regress/duplicate_enum_constructor.dart.strong.outline.expect b/pkg/front_end/testcases/regress/duplicate_enum_constructor.dart.strong.outline.expect index 7d004315a5f9..018c7867acb5 100644 --- a/pkg/front_end/testcases/regress/duplicate_enum_constructor.dart.strong.outline.expect +++ b/pkg/front_end/testcases/regress/duplicate_enum_constructor.dart.strong.outline.expect @@ -13,9 +13,9 @@ import self as self; import "dart:core" as core; class Foo extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::Foo::a, self::Foo::b]; enum-element static const field self::Foo a = const self::Foo::•(0, "a"); enum-element static const field self::Foo b = const self::Foo::•(1, "b"); + static const field core::List values = const [self::Foo::a, self::Foo::b]; const constructor •(core::int #index, core::String #name) → self::Foo : super core::_Enum::•(#index, #name) ; @@ -25,7 +25,7 @@ class Foo extends core::_Enum /*isEnum*/ { Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///duplicate_enum_constructor.dart:5:6 -> ListConstant(const [const Foo{_Enum.index: 0, _Enum._name: "a"}, const Foo{_Enum.index: 1, _Enum._name: "b"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicate_enum_constructor.dart:6:3 -> InstanceConstant(const Foo{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///duplicate_enum_constructor.dart:6:6 -> InstanceConstant(const Foo{_Enum.index: 1, _Enum._name: "b"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///duplicate_enum_constructor.dart:5:6 -> ListConstant(const [const Foo{_Enum.index: 0, _Enum._name: "a"}, const Foo{_Enum.index: 1, _Enum._name: "b"}]) Extra constant evaluation: evaluated: 8, effectively constant: 3 diff --git a/pkg/front_end/testcases/regress/duplicate_enum_constructor.dart.strong.transformed.expect b/pkg/front_end/testcases/regress/duplicate_enum_constructor.dart.strong.transformed.expect index 7d436caa6887..5d18bb160bf2 100644 --- a/pkg/front_end/testcases/regress/duplicate_enum_constructor.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/regress/duplicate_enum_constructor.dart.strong.transformed.expect @@ -13,9 +13,9 @@ import self as self; import "dart:core" as core; class Foo extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::Foo a = #C3; enum-element static const field self::Foo b = #C6; + static const field core::List values = #C7; const constructor •(core::int #index, core::String #name) → self::Foo : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/regress/enum_multiple_empty_elements_then_good_ones_etc.dart.strong.expect b/pkg/front_end/testcases/regress/enum_multiple_empty_elements_then_good_ones_etc.dart.strong.expect index 338cdc1acf20..b84b0cf7443e 100644 --- a/pkg/front_end/testcases/regress/enum_multiple_empty_elements_then_good_ones_etc.dart.strong.expect +++ b/pkg/front_end/testcases/regress/enum_multiple_empty_elements_then_good_ones_etc.dart.strong.expect @@ -21,10 +21,10 @@ import self as self; import "dart:core" as core; class Foo extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::Foo a = #C3; enum-element static const field self::Foo e = #C6; enum-element static const field self::Foo f = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::Foo : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/regress/enum_multiple_empty_elements_then_good_ones_etc.dart.strong.modular.expect b/pkg/front_end/testcases/regress/enum_multiple_empty_elements_then_good_ones_etc.dart.strong.modular.expect index 338cdc1acf20..b84b0cf7443e 100644 --- a/pkg/front_end/testcases/regress/enum_multiple_empty_elements_then_good_ones_etc.dart.strong.modular.expect +++ b/pkg/front_end/testcases/regress/enum_multiple_empty_elements_then_good_ones_etc.dart.strong.modular.expect @@ -21,10 +21,10 @@ import self as self; import "dart:core" as core; class Foo extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::Foo a = #C3; enum-element static const field self::Foo e = #C6; enum-element static const field self::Foo f = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::Foo : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/regress/enum_multiple_empty_elements_then_good_ones_etc.dart.strong.outline.expect b/pkg/front_end/testcases/regress/enum_multiple_empty_elements_then_good_ones_etc.dart.strong.outline.expect index 0859fa2f7412..4e19c3dae830 100644 --- a/pkg/front_end/testcases/regress/enum_multiple_empty_elements_then_good_ones_etc.dart.strong.outline.expect +++ b/pkg/front_end/testcases/regress/enum_multiple_empty_elements_then_good_ones_etc.dart.strong.outline.expect @@ -21,10 +21,10 @@ import self as self; import "dart:core" as core; class Foo extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::Foo::a, self::Foo::e, self::Foo::f]; enum-element static const field self::Foo a = const self::Foo::•(0, "a"); enum-element static const field self::Foo e = const self::Foo::•(1, "e"); enum-element static const field self::Foo f = const self::Foo::•(2, "f"); + static const field core::List values = const [self::Foo::a, self::Foo::e, self::Foo::f]; const synthetic constructor •(core::int #index, core::String #name) → self::Foo : super core::_Enum::•(#index, #name) ; @@ -34,8 +34,8 @@ class Foo extends core::_Enum /*isEnum*/ { Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///enum_multiple_empty_elements_then_good_ones_etc.dart:5:6 -> ListConstant(const [const Foo{_Enum.index: 0, _Enum._name: "a"}, const Foo{_Enum.index: 1, _Enum._name: "e"}, const Foo{_Enum.index: 2, _Enum._name: "f"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum_multiple_empty_elements_then_good_ones_etc.dart:7:3 -> InstanceConstant(const Foo{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum_multiple_empty_elements_then_good_ones_etc.dart:11:3 -> InstanceConstant(const Foo{_Enum.index: 1, _Enum._name: "e"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum_multiple_empty_elements_then_good_ones_etc.dart:12:3 -> InstanceConstant(const Foo{_Enum.index: 2, _Enum._name: "f"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///enum_multiple_empty_elements_then_good_ones_etc.dart:5:6 -> ListConstant(const [const Foo{_Enum.index: 0, _Enum._name: "a"}, const Foo{_Enum.index: 1, _Enum._name: "e"}, const Foo{_Enum.index: 2, _Enum._name: "f"}]) Extra constant evaluation: evaluated: 9, effectively constant: 4 diff --git a/pkg/front_end/testcases/regress/enum_multiple_empty_elements_then_good_ones_etc.dart.strong.transformed.expect b/pkg/front_end/testcases/regress/enum_multiple_empty_elements_then_good_ones_etc.dart.strong.transformed.expect index 338cdc1acf20..b84b0cf7443e 100644 --- a/pkg/front_end/testcases/regress/enum_multiple_empty_elements_then_good_ones_etc.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/regress/enum_multiple_empty_elements_then_good_ones_etc.dart.strong.transformed.expect @@ -21,10 +21,10 @@ import self as self; import "dart:core" as core; class Foo extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::Foo a = #C3; enum-element static const field self::Foo e = #C6; enum-element static const field self::Foo f = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::Foo : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/static_field_lowering/enum.dart.strong.expect b/pkg/front_end/testcases/static_field_lowering/enum.dart.strong.expect index e06ca3bcb961..a60f4306cec1 100644 --- a/pkg/front_end/testcases/static_field_lowering/enum.dart.strong.expect +++ b/pkg/front_end/testcases/static_field_lowering/enum.dart.strong.expect @@ -3,9 +3,9 @@ import self as self; import "dart:core" as core; class A extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::A a = #C3; enum-element static const field self::A b = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::A : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/static_field_lowering/enum.dart.strong.modular.expect b/pkg/front_end/testcases/static_field_lowering/enum.dart.strong.modular.expect index e06ca3bcb961..a60f4306cec1 100644 --- a/pkg/front_end/testcases/static_field_lowering/enum.dart.strong.modular.expect +++ b/pkg/front_end/testcases/static_field_lowering/enum.dart.strong.modular.expect @@ -3,9 +3,9 @@ import self as self; import "dart:core" as core; class A extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::A a = #C3; enum-element static const field self::A b = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::A : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/static_field_lowering/enum.dart.strong.outline.expect b/pkg/front_end/testcases/static_field_lowering/enum.dart.strong.outline.expect index 382a87dc625f..222a7f7225dc 100644 --- a/pkg/front_end/testcases/static_field_lowering/enum.dart.strong.outline.expect +++ b/pkg/front_end/testcases/static_field_lowering/enum.dart.strong.outline.expect @@ -3,9 +3,9 @@ import self as self; import "dart:core" as core; class A extends core::_Enum /*isEnum*/ { - static const field core::List values = const [self::A::a, self::A::b]; enum-element static const field self::A a = const self::A::•(0, "a"); enum-element static const field self::A b = const self::A::•(1, "b"); + static const field core::List values = const [self::A::a, self::A::b]; const synthetic constructor •(core::int #index, core::String #name) → self::A : super core::_Enum::•(#index, #name) ; @@ -17,7 +17,7 @@ static method main() → dynamic Extra constant evaluation status: -Evaluated: ListLiteral @ org-dartlang-testcase:///enum.dart:5:6 -> ListConstant(const [const A{_Enum.index: 0, _Enum._name: "a"}, const A{_Enum.index: 1, _Enum._name: "b"}]) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum.dart:6:3 -> InstanceConstant(const A{_Enum.index: 0, _Enum._name: "a"}) Evaluated: ConstructorInvocation @ org-dartlang-testcase:///enum.dart:7:3 -> InstanceConstant(const A{_Enum.index: 1, _Enum._name: "b"}) +Evaluated: ListLiteral @ org-dartlang-testcase:///enum.dart:5:6 -> ListConstant(const [const A{_Enum.index: 0, _Enum._name: "a"}, const A{_Enum.index: 1, _Enum._name: "b"}]) Extra constant evaluation: evaluated: 8, effectively constant: 3 diff --git a/pkg/front_end/testcases/static_field_lowering/enum.dart.strong.transformed.expect b/pkg/front_end/testcases/static_field_lowering/enum.dart.strong.transformed.expect index e06ca3bcb961..a60f4306cec1 100644 --- a/pkg/front_end/testcases/static_field_lowering/enum.dart.strong.transformed.expect +++ b/pkg/front_end/testcases/static_field_lowering/enum.dart.strong.transformed.expect @@ -3,9 +3,9 @@ import self as self; import "dart:core" as core; class A extends core::_Enum /*isEnum*/ { - static const field core::List values = #C7; enum-element static const field self::A a = #C3; enum-element static const field self::A b = #C6; + static const field core::List values = #C7; const synthetic constructor •(core::int #index, core::String #name) → self::A : super core::_Enum::•(#index, #name) ; diff --git a/pkg/front_end/testcases/textual_outline.status b/pkg/front_end/testcases/textual_outline.status index ae21a127c80b..3e1b3d626780 100644 --- a/pkg/front_end/testcases/textual_outline.status +++ b/pkg/front_end/testcases/textual_outline.status @@ -9,6 +9,7 @@ # formatter still sees as syntax errors and thus won't format. regress/annotation_on_type_parameter_name_clash_on_constructor: FormatterCrash regress/annotation_on_type_parameter_name_extension_type_constructor: FormatterCrash +enhanced_enums/external_constructor: FormatterCrash extension_types/const_constructor_body: FormatterCrash extension_types/field_access: FormatterCrash extension_types/issue52119: FormatterCrash diff --git a/pkg/vm/testcases/transformations/to_string_transformer/not_transformed.expect b/pkg/vm/testcases/transformations/to_string_transformer/not_transformed.expect index 8a2f8cd663e4..7cf7397ac6aa 100644 --- a/pkg/vm/testcases/transformations/to_string_transformer/not_transformed.expect +++ b/pkg/vm/testcases/transformations/to_string_transformer/not_transformed.expect @@ -20,10 +20,10 @@ class Foo extends core::Object implements self::IFoo { return "I am a Foo"; } class FooEnum extends core::_Enum /*isEnum*/ { - static const field core::List values = #C11; enum-element static const field self::FooEnum A = #C4; enum-element static const field self::FooEnum B = #C7; enum-element static const field self::FooEnum C = #C10; + static const field core::List values = #C11; const synthetic constructor •(core::int #index, core::String #name) → self::FooEnum : super core::_Enum::•(#index, #name) ; diff --git a/pkg/vm/testcases/transformations/to_string_transformer/transformed.expect b/pkg/vm/testcases/transformations/to_string_transformer/transformed.expect index 284f5495fdbf..bbf7b238e590 100644 --- a/pkg/vm/testcases/transformations/to_string_transformer/transformed.expect +++ b/pkg/vm/testcases/transformations/to_string_transformer/transformed.expect @@ -20,10 +20,10 @@ class Foo extends core::Object implements self::IFoo { return super.{core::Object::toString}(); } class FooEnum extends core::_Enum /*isEnum*/ { - static const field core::List values = #C11; enum-element static const field self::FooEnum A = #C4; enum-element static const field self::FooEnum B = #C7; enum-element static const field self::FooEnum C = #C10; + static const field core::List values = #C11; const synthetic constructor •(core::int #index, core::String #name) → self::FooEnum : super core::_Enum::•(#index, #name) ; diff --git a/pkg/vm/testcases/transformations/type_flow/summary_collector/control_flow.dart.expect b/pkg/vm/testcases/transformations/type_flow/summary_collector/control_flow.dart.expect index fc97dc00c283..4a8ae46f6c8a 100644 --- a/pkg/vm/testcases/transformations/type_flow/summary_collector/control_flow.dart.expect +++ b/pkg/vm/testcases/transformations/type_flow/summary_collector/control_flow.dart.expect @@ -28,15 +28,15 @@ RESULT: _T {} %this = _Parameter #0 [_T (#lib::TestEnum)+] t1 = _Call virtual get [dart.core::_Enum._name] (%this) RESULT: _T (dart.core::String)+ ------------- TestEnum.values ------------ - -RESULT: _T (dart.core::_ImmutableList, const <#lib::TestEnum>[const #lib::TestEnum{dart.core::_Enum.index: 0, dart.core::_Enum._name: "v1"}, const #lib::TestEnum{dart.core::_Enum.index: 1, dart.core::_Enum._name: "v2"}]) ------------ TestEnum.v1 ------------ RESULT: _T (#lib::TestEnum, const #lib::TestEnum{dart.core::_Enum.index: 0, dart.core::_Enum._name: "v1"}) ------------ TestEnum.v2 ------------ RESULT: _T (#lib::TestEnum, const #lib::TestEnum{dart.core::_Enum.index: 1, dart.core::_Enum._name: "v2"}) +------------ TestEnum.values ------------ + +RESULT: _T (dart.core::_ImmutableList, const <#lib::TestEnum>[const #lib::TestEnum{dart.core::_Enum.index: 0, dart.core::_Enum._name: "v1"}, const #lib::TestEnum{dart.core::_Enum.index: 1, dart.core::_Enum._name: "v2"}]) ------------ foo ------------ %x = _Parameter #0 [_T ANY?] RESULT: _T {}? diff --git a/pkg/vm/testcases/transformations/unreachable_code_elimination/uce_testcases.dart.expect b/pkg/vm/testcases/transformations/unreachable_code_elimination/uce_testcases.dart.expect index 50cf34dc08f6..ae9148285022 100644 --- a/pkg/vm/testcases/transformations/unreachable_code_elimination/uce_testcases.dart.expect +++ b/pkg/vm/testcases/transformations/unreachable_code_elimination/uce_testcases.dart.expect @@ -7,10 +7,10 @@ class TestAssertInitializer extends core::Object { : super core::Object::•() {} } class TestPlatform extends core::_Enum /*isEnum*/ { - static const field core::List values = #C10; enum-element static const field self::TestPlatform linux = #C3; enum-element static const field self::TestPlatform macos = #C6; enum-element static const field self::TestPlatform windows = #C9; + static const field core::List values = #C10; const synthetic constructor •(core::int #index, core::String #name) → self::TestPlatform : super core::_Enum::•(#index, #name) ; diff --git a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.android.debug.expect b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.android.debug.expect index c246ecd35eb2..bd33d88f22bf 100644 --- a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.android.debug.expect +++ b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.android.debug.expect @@ -5,13 +5,13 @@ import "dart:core" as core; import "dart:io"; class TestPlatform extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::TestPlatform android = #C3; enum-element static const field self::TestPlatform fuchsia = #C6; enum-element static const field self::TestPlatform ios = #C9; enum-element static const field self::TestPlatform linux = #C12; enum-element static const field self::TestPlatform macos = #C15; enum-element static const field self::TestPlatform windows = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::TestPlatform : super core::_Enum::•(#index, #name) ; diff --git a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.android.debug.withAsserts.expect b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.android.debug.withAsserts.expect index 5736a4641602..c88d86c8d9bc 100644 --- a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.android.debug.withAsserts.expect +++ b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.android.debug.withAsserts.expect @@ -6,13 +6,13 @@ import "dart:io" as io; import "dart:io"; class TestPlatform extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::TestPlatform android = #C3; enum-element static const field self::TestPlatform fuchsia = #C6; enum-element static const field self::TestPlatform ios = #C9; enum-element static const field self::TestPlatform linux = #C12; enum-element static const field self::TestPlatform macos = #C15; enum-element static const field self::TestPlatform windows = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::TestPlatform : super core::_Enum::•(#index, #name) ; diff --git a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.android.expect b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.android.expect index 37b5ec36be8b..d361e4c9db48 100644 --- a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.android.expect +++ b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.android.expect @@ -5,13 +5,13 @@ import "dart:core" as core; import "dart:io"; class TestPlatform extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::TestPlatform android = #C3; enum-element static const field self::TestPlatform fuchsia = #C6; enum-element static const field self::TestPlatform ios = #C9; enum-element static const field self::TestPlatform linux = #C12; enum-element static const field self::TestPlatform macos = #C15; enum-element static const field self::TestPlatform windows = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::TestPlatform : super core::_Enum::•(#index, #name) ; diff --git a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.android.withAsserts.expect b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.android.withAsserts.expect index 76a56d47abef..33840a5d9102 100644 --- a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.android.withAsserts.expect +++ b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.android.withAsserts.expect @@ -6,13 +6,13 @@ import "dart:io" as io; import "dart:io"; class TestPlatform extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::TestPlatform android = #C3; enum-element static const field self::TestPlatform fuchsia = #C6; enum-element static const field self::TestPlatform ios = #C9; enum-element static const field self::TestPlatform linux = #C12; enum-element static const field self::TestPlatform macos = #C15; enum-element static const field self::TestPlatform windows = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::TestPlatform : super core::_Enum::•(#index, #name) ; diff --git a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.fuchsia.debug.expect b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.fuchsia.debug.expect index 58956748ee12..54ea5204e593 100644 --- a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.fuchsia.debug.expect +++ b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.fuchsia.debug.expect @@ -5,13 +5,13 @@ import "dart:core" as core; import "dart:io"; class TestPlatform extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::TestPlatform android = #C3; enum-element static const field self::TestPlatform fuchsia = #C6; enum-element static const field self::TestPlatform ios = #C9; enum-element static const field self::TestPlatform linux = #C12; enum-element static const field self::TestPlatform macos = #C15; enum-element static const field self::TestPlatform windows = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::TestPlatform : super core::_Enum::•(#index, #name) ; diff --git a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.fuchsia.debug.withAsserts.expect b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.fuchsia.debug.withAsserts.expect index f6f7fa354197..ff581b84e8d2 100644 --- a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.fuchsia.debug.withAsserts.expect +++ b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.fuchsia.debug.withAsserts.expect @@ -6,13 +6,13 @@ import "dart:io" as io; import "dart:io"; class TestPlatform extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::TestPlatform android = #C3; enum-element static const field self::TestPlatform fuchsia = #C6; enum-element static const field self::TestPlatform ios = #C9; enum-element static const field self::TestPlatform linux = #C12; enum-element static const field self::TestPlatform macos = #C15; enum-element static const field self::TestPlatform windows = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::TestPlatform : super core::_Enum::•(#index, #name) ; diff --git a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.fuchsia.expect b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.fuchsia.expect index b6be6469b893..ff07299baf63 100644 --- a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.fuchsia.expect +++ b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.fuchsia.expect @@ -5,13 +5,13 @@ import "dart:core" as core; import "dart:io"; class TestPlatform extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::TestPlatform android = #C3; enum-element static const field self::TestPlatform fuchsia = #C6; enum-element static const field self::TestPlatform ios = #C9; enum-element static const field self::TestPlatform linux = #C12; enum-element static const field self::TestPlatform macos = #C15; enum-element static const field self::TestPlatform windows = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::TestPlatform : super core::_Enum::•(#index, #name) ; diff --git a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.fuchsia.withAsserts.expect b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.fuchsia.withAsserts.expect index 202e11f379ad..fadaac7b4ffe 100644 --- a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.fuchsia.withAsserts.expect +++ b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.fuchsia.withAsserts.expect @@ -6,13 +6,13 @@ import "dart:io" as io; import "dart:io"; class TestPlatform extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::TestPlatform android = #C3; enum-element static const field self::TestPlatform fuchsia = #C6; enum-element static const field self::TestPlatform ios = #C9; enum-element static const field self::TestPlatform linux = #C12; enum-element static const field self::TestPlatform macos = #C15; enum-element static const field self::TestPlatform windows = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::TestPlatform : super core::_Enum::•(#index, #name) ; diff --git a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.ios.debug.expect b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.ios.debug.expect index 40f8c8caa185..4817cf6ac66f 100644 --- a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.ios.debug.expect +++ b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.ios.debug.expect @@ -5,13 +5,13 @@ import "dart:core" as core; import "dart:io"; class TestPlatform extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::TestPlatform android = #C3; enum-element static const field self::TestPlatform fuchsia = #C6; enum-element static const field self::TestPlatform ios = #C9; enum-element static const field self::TestPlatform linux = #C12; enum-element static const field self::TestPlatform macos = #C15; enum-element static const field self::TestPlatform windows = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::TestPlatform : super core::_Enum::•(#index, #name) ; diff --git a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.ios.debug.withAsserts.expect b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.ios.debug.withAsserts.expect index 92c683d4e8d2..263d8bd274b2 100644 --- a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.ios.debug.withAsserts.expect +++ b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.ios.debug.withAsserts.expect @@ -6,13 +6,13 @@ import "dart:io" as io; import "dart:io"; class TestPlatform extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::TestPlatform android = #C3; enum-element static const field self::TestPlatform fuchsia = #C6; enum-element static const field self::TestPlatform ios = #C9; enum-element static const field self::TestPlatform linux = #C12; enum-element static const field self::TestPlatform macos = #C15; enum-element static const field self::TestPlatform windows = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::TestPlatform : super core::_Enum::•(#index, #name) ; diff --git a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.ios.expect b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.ios.expect index 5fb1decb5bdb..195d72273b61 100644 --- a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.ios.expect +++ b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.ios.expect @@ -5,13 +5,13 @@ import "dart:core" as core; import "dart:io"; class TestPlatform extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::TestPlatform android = #C3; enum-element static const field self::TestPlatform fuchsia = #C6; enum-element static const field self::TestPlatform ios = #C9; enum-element static const field self::TestPlatform linux = #C12; enum-element static const field self::TestPlatform macos = #C15; enum-element static const field self::TestPlatform windows = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::TestPlatform : super core::_Enum::•(#index, #name) ; diff --git a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.ios.withAsserts.expect b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.ios.withAsserts.expect index b7a5fb998829..91b059228138 100644 --- a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.ios.withAsserts.expect +++ b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.ios.withAsserts.expect @@ -6,13 +6,13 @@ import "dart:io" as io; import "dart:io"; class TestPlatform extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::TestPlatform android = #C3; enum-element static const field self::TestPlatform fuchsia = #C6; enum-element static const field self::TestPlatform ios = #C9; enum-element static const field self::TestPlatform linux = #C12; enum-element static const field self::TestPlatform macos = #C15; enum-element static const field self::TestPlatform windows = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::TestPlatform : super core::_Enum::•(#index, #name) ; diff --git a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.linux.debug.expect b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.linux.debug.expect index 59b12b65b45d..9f733cdf8c2e 100644 --- a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.linux.debug.expect +++ b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.linux.debug.expect @@ -5,13 +5,13 @@ import "dart:core" as core; import "dart:io"; class TestPlatform extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::TestPlatform android = #C3; enum-element static const field self::TestPlatform fuchsia = #C6; enum-element static const field self::TestPlatform ios = #C9; enum-element static const field self::TestPlatform linux = #C12; enum-element static const field self::TestPlatform macos = #C15; enum-element static const field self::TestPlatform windows = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::TestPlatform : super core::_Enum::•(#index, #name) ; diff --git a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.linux.debug.withAsserts.expect b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.linux.debug.withAsserts.expect index 264d4e8b3113..5f57b27cb443 100644 --- a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.linux.debug.withAsserts.expect +++ b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.linux.debug.withAsserts.expect @@ -6,13 +6,13 @@ import "dart:io" as io; import "dart:io"; class TestPlatform extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::TestPlatform android = #C3; enum-element static const field self::TestPlatform fuchsia = #C6; enum-element static const field self::TestPlatform ios = #C9; enum-element static const field self::TestPlatform linux = #C12; enum-element static const field self::TestPlatform macos = #C15; enum-element static const field self::TestPlatform windows = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::TestPlatform : super core::_Enum::•(#index, #name) ; diff --git a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.linux.expect b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.linux.expect index 1a13aa439fdc..ae235f04a067 100644 --- a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.linux.expect +++ b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.linux.expect @@ -5,13 +5,13 @@ import "dart:core" as core; import "dart:io"; class TestPlatform extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::TestPlatform android = #C3; enum-element static const field self::TestPlatform fuchsia = #C6; enum-element static const field self::TestPlatform ios = #C9; enum-element static const field self::TestPlatform linux = #C12; enum-element static const field self::TestPlatform macos = #C15; enum-element static const field self::TestPlatform windows = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::TestPlatform : super core::_Enum::•(#index, #name) ; diff --git a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.linux.withAsserts.expect b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.linux.withAsserts.expect index 49786a525cba..b20c82e002ed 100644 --- a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.linux.withAsserts.expect +++ b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.linux.withAsserts.expect @@ -6,13 +6,13 @@ import "dart:io" as io; import "dart:io"; class TestPlatform extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::TestPlatform android = #C3; enum-element static const field self::TestPlatform fuchsia = #C6; enum-element static const field self::TestPlatform ios = #C9; enum-element static const field self::TestPlatform linux = #C12; enum-element static const field self::TestPlatform macos = #C15; enum-element static const field self::TestPlatform windows = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::TestPlatform : super core::_Enum::•(#index, #name) ; diff --git a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.macos.debug.expect b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.macos.debug.expect index a23a91199d51..0b0c938eb8ae 100644 --- a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.macos.debug.expect +++ b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.macos.debug.expect @@ -5,13 +5,13 @@ import "dart:core" as core; import "dart:io"; class TestPlatform extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::TestPlatform android = #C3; enum-element static const field self::TestPlatform fuchsia = #C6; enum-element static const field self::TestPlatform ios = #C9; enum-element static const field self::TestPlatform linux = #C12; enum-element static const field self::TestPlatform macos = #C15; enum-element static const field self::TestPlatform windows = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::TestPlatform : super core::_Enum::•(#index, #name) ; diff --git a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.macos.debug.withAsserts.expect b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.macos.debug.withAsserts.expect index a2f7f2d635c6..c174a01ee821 100644 --- a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.macos.debug.withAsserts.expect +++ b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.macos.debug.withAsserts.expect @@ -6,13 +6,13 @@ import "dart:io" as io; import "dart:io"; class TestPlatform extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::TestPlatform android = #C3; enum-element static const field self::TestPlatform fuchsia = #C6; enum-element static const field self::TestPlatform ios = #C9; enum-element static const field self::TestPlatform linux = #C12; enum-element static const field self::TestPlatform macos = #C15; enum-element static const field self::TestPlatform windows = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::TestPlatform : super core::_Enum::•(#index, #name) ; diff --git a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.macos.expect b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.macos.expect index 867fa6bb0e7e..d5ba13174914 100644 --- a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.macos.expect +++ b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.macos.expect @@ -5,13 +5,13 @@ import "dart:core" as core; import "dart:io"; class TestPlatform extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::TestPlatform android = #C3; enum-element static const field self::TestPlatform fuchsia = #C6; enum-element static const field self::TestPlatform ios = #C9; enum-element static const field self::TestPlatform linux = #C12; enum-element static const field self::TestPlatform macos = #C15; enum-element static const field self::TestPlatform windows = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::TestPlatform : super core::_Enum::•(#index, #name) ; diff --git a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.macos.withAsserts.expect b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.macos.withAsserts.expect index dbc73acde2ac..f9db439d6069 100644 --- a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.macos.withAsserts.expect +++ b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.macos.withAsserts.expect @@ -6,13 +6,13 @@ import "dart:io" as io; import "dart:io"; class TestPlatform extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::TestPlatform android = #C3; enum-element static const field self::TestPlatform fuchsia = #C6; enum-element static const field self::TestPlatform ios = #C9; enum-element static const field self::TestPlatform linux = #C12; enum-element static const field self::TestPlatform macos = #C15; enum-element static const field self::TestPlatform windows = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::TestPlatform : super core::_Enum::•(#index, #name) ; diff --git a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.windows.debug.expect b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.windows.debug.expect index da1e4a149f85..31bced0c1288 100644 --- a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.windows.debug.expect +++ b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.windows.debug.expect @@ -5,13 +5,13 @@ import "dart:core" as core; import "dart:io"; class TestPlatform extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::TestPlatform android = #C3; enum-element static const field self::TestPlatform fuchsia = #C6; enum-element static const field self::TestPlatform ios = #C9; enum-element static const field self::TestPlatform linux = #C12; enum-element static const field self::TestPlatform macos = #C15; enum-element static const field self::TestPlatform windows = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::TestPlatform : super core::_Enum::•(#index, #name) ; diff --git a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.windows.debug.withAsserts.expect b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.windows.debug.withAsserts.expect index 09917aa7209b..6b91f687b543 100644 --- a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.windows.debug.withAsserts.expect +++ b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.windows.debug.withAsserts.expect @@ -6,13 +6,13 @@ import "dart:io" as io; import "dart:io"; class TestPlatform extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::TestPlatform android = #C3; enum-element static const field self::TestPlatform fuchsia = #C6; enum-element static const field self::TestPlatform ios = #C9; enum-element static const field self::TestPlatform linux = #C12; enum-element static const field self::TestPlatform macos = #C15; enum-element static const field self::TestPlatform windows = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::TestPlatform : super core::_Enum::•(#index, #name) ; diff --git a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.windows.expect b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.windows.expect index ba79b6505db8..fbe30136da13 100644 --- a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.windows.expect +++ b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.windows.expect @@ -5,13 +5,13 @@ import "dart:core" as core; import "dart:io"; class TestPlatform extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::TestPlatform android = #C3; enum-element static const field self::TestPlatform fuchsia = #C6; enum-element static const field self::TestPlatform ios = #C9; enum-element static const field self::TestPlatform linux = #C12; enum-element static const field self::TestPlatform macos = #C15; enum-element static const field self::TestPlatform windows = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::TestPlatform : super core::_Enum::•(#index, #name) ; diff --git a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.windows.withAsserts.expect b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.windows.withAsserts.expect index b8a8ce41469d..5def81e8ac76 100644 --- a/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.windows.withAsserts.expect +++ b/pkg/vm/testcases/transformations/vm_constant_evaluator/successes/platform_testcases.dart.windows.withAsserts.expect @@ -6,13 +6,13 @@ import "dart:io" as io; import "dart:io"; class TestPlatform extends core::_Enum /*isEnum*/ { - static const field core::List values = #C19; enum-element static const field self::TestPlatform android = #C3; enum-element static const field self::TestPlatform fuchsia = #C6; enum-element static const field self::TestPlatform ios = #C9; enum-element static const field self::TestPlatform linux = #C12; enum-element static const field self::TestPlatform macos = #C15; enum-element static const field self::TestPlatform windows = #C18; + static const field core::List values = #C19; const synthetic constructor •(core::int #index, core::String #name) → self::TestPlatform : super core::_Enum::•(#index, #name) ;