dart-sdk/tests/language/variance
Johnni Winther 02e8bbb036 [cfe,analyzer] Share experimental flags for the parser
This adds a new generated file into _fe_analyzer_shared for the
experimental flags. This is now used by the parser when generating
messages about features not being available.

The default implementation uses whether the feature is enabled by default
or not, to emit different messages. This change will therefore ensure
that when a missing feature changes from 'experimental' to
'enabled by default', the  message reported by the parser will be
updated accordingly. Currently errors are only reported from the parser
on features that are enabled by default, so the message for experimental
features is not currently used.

The reporting is performed through the Listener, such that
implementations can override the reporting to improve the messaging.
This is done in the CFE where the message is improved to take into
account whether the language version is explicit in the parsed library.

In response to https://github.com/dart-lang/sdk/issues/46329

Change-Id: Ief812817c7eb4b1e433389f6f49d6a1f77604fa7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/269860
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-11-17 11:32:01 +00:00
..
syntax [cfe,analyzer] Share experimental flags for the parser 2022-11-17 11:32:01 +00:00
variance_downwards_inference_test.dart Fix mistakes in variance_downwards_inference_test. 2020-09-17 00:15:19 +00:00
variance_in_field_error_test.dart
variance_in_field_test.dart
variance_in_inference_error_test.dart Fix analyzer implementation of the "variance" feature. 2022-03-10 15:56:35 +00:00
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 [cfe] Refactor bounds checking 2022-05-17 14:36:19 +00:00
variance_in_subtyping_test.dart
variance_inout_field_test.dart
variance_inout_inference_error_test.dart Fix analyzer implementation of the "variance" feature. 2022-03-10 15:56:35 +00:00
variance_inout_inference_test.dart
variance_inout_method_test.dart
variance_inout_subclass_test.dart
variance_inout_subtyping_error_test.dart [cfe] Refactor bounds checking 2022-05-17 14:36:19 +00:00
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 Move codes from StaticTypeWarningCode into CompileTimeErrorCode. 2020-07-27 16:44:15 +00:00
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 [cfe] Refactor bounds checking 2022-05-17 14:36:19 +00:00
variance_out_subtyping_test.dart
variance_unconstrained_inference_test.dart
variance_upper_lower_bounds_error_test.dart Move codes from StaticTypeWarningCode into CompileTimeErrorCode. 2020-07-27 16:44:15 +00:00
variance_upper_lower_bounds_test.dart