File tree Expand file tree Collapse file tree 4 files changed +14
-9
lines changed Expand file tree Collapse file tree 4 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 1+ ## 7.3.0-dev
2+ * Add ` flags ` optional named parameter to ` FeatureSet.latestLanguageVersion() ` .
3+
14## 7.2.0
25* Add ` ElementDirective ` as superinterface for ` LibraryExport ` , ` LibraryImport ` ,
36 and ` PartInclude ` . It implements ` Annotatable ` .
Original file line number Diff line number Diff line change @@ -136,13 +136,14 @@ abstract class FeatureSet {
136136 }) = ExperimentStatus .fromStrings2;
137137
138138 /// Computes the set of features for the latest language version known
139- /// to the analyzer, without any experiments. Use it only if you really
140- /// don't care which language version you want to use, and sure that the
141- /// code that you process is valid for the latest language version.
139+ /// to the analyzer, with experiments according to [flags] . Use it only if
140+ /// you really don't care which language version you want to use, and sure
141+ /// that the code that you process is valid for the latest language version.
142142 ///
143143 /// Otherwise, it is recommended to use [FeatureSet.fromEnableFlags2] .
144- factory FeatureSet .latestLanguageVersion () =
145- ExperimentStatus .latestLanguageVersion;
144+ factory FeatureSet .latestLanguageVersion ({
145+ List <String > flags,
146+ }) = ExperimentStatus .latestLanguageVersion;
146147
147148 /// Queries whether the given [feature] is contained in this feature set.
148149 bool isEnabled (Feature feature);
Original file line number Diff line number Diff line change @@ -93,7 +93,6 @@ class ExperimentStatus with _CurrentState implements FeatureSet {
9393 factory ExperimentStatus .fromStrings2 ({
9494 required Version sdkLanguageVersion,
9595 required List <String > flags,
96- // TODO(scheglov): use restrictEnableFlagsToVersion
9796 }) {
9897 var explicitFlags = decodeExplicitFlags (flags);
9998
@@ -112,10 +111,12 @@ class ExperimentStatus with _CurrentState implements FeatureSet {
112111 );
113112 }
114113
115- factory ExperimentStatus .latestLanguageVersion () {
114+ factory ExperimentStatus .latestLanguageVersion ({
115+ List <String > flags = const [],
116+ }) {
116117 return ExperimentStatus .fromStrings2 (
117118 sdkLanguageVersion: currentVersion,
118- flags: [] ,
119+ flags: flags ,
119120 );
120121 }
121122
Original file line number Diff line number Diff line change 11name : analyzer
2- version : 7.2.0
2+ version : 7.3.0-dev
33description : >-
44 This package provides a library that performs static analysis of Dart code.
55repository : https://github.com/dart-lang/sdk/tree/main/pkg/analyzer
You can’t perform that action at this time.
0 commit comments