mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 02:57:35 +00:00
5db0c2b546
While rereading the analyzer logic that decides whether to suppress field promotion due to the presence of a `noSuchMethod` forwarder, I found a few corner cases that aren't handled correctly: - The logic for deciding which fields are included in a class's implementation currently doesn't understand that an abstract field is abstract; it treats it as a concrete field, therefore if a concrete subclass implements of `noSuchMethod`, but fails to implement the field, the analyzer fails to detect that there will be a `noSuchMethod` forwarder (and thus fails to suppress promotion). - The logic for collecting the set of fields (and getters) that are included in a class's interface (or implementation) currently stops at a library boundary, so it doesn't properly handle the situation where there is a library cycle, and two classes in one library are related through an intermediate class in some other library. - The logic for collecting the set of getters that are included in a class's interface currently ignores the `on` clauses of mixins. This CL includes tests for all these corner cases; I will fix them in a follow-up CL. Change-Id: I92d73c0643f1ab89144feefab68779418a2c7a35 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313840 Reviewed-by: Erik Ernst <eernst@google.com> Reviewed-by: Lasse Nielsen <lrn@google.com> Commit-Queue: Paul Berry <paulberry@google.com> |
||
---|---|---|
.. | ||
abstract_field_test.dart | ||
basic_field_promotion_test.dart | ||
cascaded_field_promotion_null_aware_test.dart | ||
cascaded_field_promotion_test.dart | ||
cascaded_field_promotion_unnecessary_null_aware_error_test.dart | ||
cascaded_field_promotion_unstable_target_test.dart | ||
disabled_test.dart | ||
do_not_promote_abstract_getters_test.dart | ||
do_not_promote_methods_test.dart | ||
field_invocation_promotion_test.dart | ||
field_promotion_and_no_such_method_abstract_field_test.dart | ||
field_promotion_and_no_such_method_inherited_abstract_field_test.dart | ||
field_promotion_and_no_such_method_lib.dart | ||
field_promotion_and_no_such_method_library_cycle_lib.dart | ||
field_promotion_and_no_such_method_library_cycle_test.dart | ||
field_promotion_and_no_such_method_on_clause_test.dart | ||
field_promotion_and_no_such_method_test.dart | ||
field_promotion_name_conflicts_part.dart | ||
field_promotion_name_conflicts_test.dart | ||
no_such_method_restriction_disabled_lib.dart | ||
no_such_method_restriction_disabled_test.dart | ||
no_such_method_restriction_enabled_lib.dart | ||
no_such_method_restriction_enabled_test.dart | ||
no_such_method_restriction_stack_trace_lib1.dart | ||
no_such_method_restriction_stack_trace_lib2.dart | ||
no_such_method_restriction_stack_trace_test.dart | ||
promotion_makes_new_extension_available_test.dart | ||
promotion_makes_new_extension_available_via_non_nullability_test.dart | ||
promotion_makes_new_interface_available_test.dart | ||
promotion_narrows_interface_test.dart | ||
super_this_distinction_error_test.dart | ||
super_this_distinction_generic_error_test.dart | ||
super_this_distinction_generic_test.dart | ||
super_this_distinction_test.dart | ||
top_level_type_inference_test.dart |