mirror of
https://github.com/dart-lang/sdk
synced 2024-09-18 20:31:21 +00:00
5222bfd90c
This CL moves the bounds checking into the TypeBuilder instead of performing it from the outside on the computed DartType node. This solves several problems: 1) Errors are now reported on the type in the code instead of the declaration which holds the type. 2) Checking of type aliases (both function and nonfunction type aliases) is now handled correctly in all cases. This achieved by computed the aliased type (containing TypedefType nodes) internally and performing the checking on this type, and only convert the type into the unaliased version (without TypedefType nodes) after checks have been performed. Previously this handled through the FunctionType.typedefType property for function type aliases and through and incomplete work-around for nonfunction type aliases. 3) With 2) FunctionType.typedefType is no longer needed and is removed. TEST=general/bounds_* Change-Id: I7653bca5ccb0ebf4b3553828a298d1ad918ef235 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243722 Reviewed-by: Mayank Patke <fishythefish@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com> Reviewed-by: Chloe Stefantsova <cstefantsova@google.com> Reviewed-by: Alexander Markov <alexmarkov@google.com> |
||
---|---|---|
.. | ||
syntax | ||
variance_downwards_inference_test.dart | ||
variance_in_field_error_test.dart | ||
variance_in_field_test.dart | ||
variance_in_inference_error_test.dart | ||
variance_in_inference_test.dart | ||
variance_in_method_error_test.dart | ||
variance_in_method_test.dart | ||
variance_in_subclass_error_test.dart | ||
variance_in_subclass_test.dart | ||
variance_in_subtyping_error_test.dart | ||
variance_in_subtyping_test.dart | ||
variance_inout_field_test.dart | ||
variance_inout_inference_error_test.dart | ||
variance_inout_inference_test.dart | ||
variance_inout_method_test.dart | ||
variance_inout_subclass_test.dart | ||
variance_inout_subtyping_error_test.dart | ||
variance_inout_subtyping_test.dart | ||
variance_method_tearoff_test.dart | ||
variance_multi_subclass_error_test.dart | ||
variance_multi_subclass_test.dart | ||
variance_out_field_error_test.dart | ||
variance_out_field_test.dart | ||
variance_out_inference_error_test.dart | ||
variance_out_inference_test.dart | ||
variance_out_method_error_test.dart | ||
variance_out_method_test.dart | ||
variance_out_subclass_error_test.dart | ||
variance_out_subclass_test.dart | ||
variance_out_subtyping_error_test.dart | ||
variance_out_subtyping_test.dart | ||
variance_unconstrained_inference_test.dart | ||
variance_upper_lower_bounds_error_test.dart | ||
variance_upper_lower_bounds_test.dart |