Fix the indexes associated with experiements
Change-Id: Ic6790de12b22d8aa05976bb0e2004a43bda4e5a7
Reviewed-on: https://dart-review.googlesource.com/c/90441
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
diff --git a/pkg/analyzer/lib/src/dart/analysis/experiments.dart b/pkg/analyzer/lib/src/dart/analysis/experiments.dart
index e99ffb5..4cdd478 100644
--- a/pkg/analyzer/lib/src/dart/analysis/experiments.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/experiments.dart
@@ -122,9 +122,9 @@
constant_update_2018 ?? IsEnabledByDefault.constant_update_2018,
set_literals ?? IsEnabledByDefault.set_literals,
non_nullable ?? IsEnabledByDefault.non_nullable,
- spread_collections ?? IsEnabledByDefault.spread_collections,
control_flow_collections ??
IsEnabledByDefault.control_flow_collections,
+ spread_collections ?? IsEnabledByDefault.spread_collections,
];
/// Decodes the strings given in [flags] into a representation of the set of
@@ -146,6 +146,9 @@
/// Current state for the flag "constant-update-2018"
bool get constant_update_2018 => _enableFlags[0];
+ /// Current state for the flag "control_flow_collections"
+ bool get control_flow_collections => _enableFlags[3];
+
/// Current state for the flag "non-nullable"
bool get non_nullable => _enableFlags[2];
@@ -153,10 +156,7 @@
bool get set_literals => _enableFlags[1];
/// Current state for the flag "spread_collections"
- bool get spread_collections => _enableFlags[3];
-
- /// Current state for the flag "control_flow_collections"
- bool get control_flow_collections => _enableFlags[4];
+ bool get spread_collections => _enableFlags[4];
/// Queries whether the given [feature] is enabled or disabled.
bool isEnabled(ExperimentalFeature feature) => feature.isExpired