mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
Rename 'views' experimental flag to 'inline-class'
This feature is about to be renamed from Views to Inline Classes and we adjust the flag name accordingly. The rename PR hasn't landed yet, but we update the flag now to unblock work on co19 tests. Change-Id: Ib6981b99f8541ed75f3315059a8bbca02f3a4579 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275000 Reviewed-by: Erik Ernst <eernst@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com> Reviewed-by: Michael Thomsen <mit@google.com>
This commit is contained in:
parent
783642d594
commit
aa51913101
|
@ -79,6 +79,13 @@ enum ExperimentalFlag {
|
|||
experimentEnabledVersion: const Version(3, 0),
|
||||
experimentReleasedVersion: const Version(3, 0)),
|
||||
|
||||
inlineClass(
|
||||
name: 'inline-class',
|
||||
isEnabledByDefault: false,
|
||||
isExpired: false,
|
||||
experimentEnabledVersion: const Version(3, 0),
|
||||
experimentReleasedVersion: const Version(3, 0)),
|
||||
|
||||
macros(
|
||||
name: 'macros',
|
||||
isEnabledByDefault: false,
|
||||
|
@ -183,13 +190,6 @@ enum ExperimentalFlag {
|
|||
isExpired: false,
|
||||
experimentEnabledVersion: const Version(3, 0),
|
||||
experimentReleasedVersion: const Version(3, 0)),
|
||||
|
||||
views(
|
||||
name: 'views',
|
||||
isEnabledByDefault: false,
|
||||
isExpired: false,
|
||||
experimentEnabledVersion: const Version(3, 0),
|
||||
experimentReleasedVersion: const Version(3, 0)),
|
||||
;
|
||||
|
||||
final String name;
|
||||
|
|
|
@ -40,6 +40,9 @@ abstract class Feature {
|
|||
/// Feature information for inference-update-2.
|
||||
static final inference_update_2 = ExperimentalFeatures.inference_update_2;
|
||||
|
||||
/// Feature information for inline classes.
|
||||
static final inline_class = ExperimentalFeatures.inline_class;
|
||||
|
||||
/// Feature information for macros.
|
||||
static final macros = ExperimentalFeatures.macros;
|
||||
|
||||
|
@ -75,9 +78,6 @@ abstract class Feature {
|
|||
/// Feature information for unnamed libraries.
|
||||
static final unnamedLibraries = ExperimentalFeatures.unnamed_libraries;
|
||||
|
||||
/// Feature information for views.
|
||||
static final views = ExperimentalFeatures.views;
|
||||
|
||||
/// Feature information for variance.
|
||||
static final variance = ExperimentalFeatures.variance;
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ import 'package:analyzer/src/util/performance/operation_performance.dart';
|
|||
/// TODO(scheglov) Clean up the list of implicitly analyzed files.
|
||||
class AnalysisDriver implements AnalysisDriverGeneric {
|
||||
/// The version of data format, should be incremented on every format change.
|
||||
static const int DATA_VERSION = 252;
|
||||
static const int DATA_VERSION = 253;
|
||||
|
||||
/// The number of exception contexts allowed to write. Once this field is
|
||||
/// zero, we stop writing any new exception contexts in this process.
|
||||
|
|
|
@ -27,6 +27,7 @@ final _knownFeatures = <String, ExperimentalFeature>{
|
|||
EnableString.generic_metadata: ExperimentalFeatures.generic_metadata,
|
||||
EnableString.inference_update_1: ExperimentalFeatures.inference_update_1,
|
||||
EnableString.inference_update_2: ExperimentalFeatures.inference_update_2,
|
||||
EnableString.inline_class: ExperimentalFeatures.inline_class,
|
||||
EnableString.macros: ExperimentalFeatures.macros,
|
||||
EnableString.named_arguments_anywhere:
|
||||
ExperimentalFeatures.named_arguments_anywhere,
|
||||
|
@ -44,7 +45,6 @@ final _knownFeatures = <String, ExperimentalFeature>{
|
|||
EnableString.unnamed_libraries: ExperimentalFeatures.unnamed_libraries,
|
||||
EnableString.value_class: ExperimentalFeatures.value_class,
|
||||
EnableString.variance: ExperimentalFeatures.variance,
|
||||
EnableString.views: ExperimentalFeatures.views,
|
||||
};
|
||||
|
||||
/// Constant strings for enabling each of the currently known experimental
|
||||
|
@ -80,6 +80,9 @@ class EnableString {
|
|||
/// String to enable the experiment "inference-update-2"
|
||||
static const String inference_update_2 = 'inference-update-2';
|
||||
|
||||
/// String to enable the experiment "inline-class"
|
||||
static const String inline_class = 'inline-class';
|
||||
|
||||
/// String to enable the experiment "macros"
|
||||
static const String macros = 'macros';
|
||||
|
||||
|
@ -124,9 +127,6 @@ class EnableString {
|
|||
|
||||
/// String to enable the experiment "variance"
|
||||
static const String variance = 'variance';
|
||||
|
||||
/// String to enable the experiment "views"
|
||||
static const String views = 'views';
|
||||
}
|
||||
|
||||
class ExperimentalFeatures {
|
||||
|
@ -234,8 +234,18 @@ class ExperimentalFeatures {
|
|||
releaseVersion: null,
|
||||
);
|
||||
|
||||
static final macros = ExperimentalFeature(
|
||||
static final inline_class = ExperimentalFeature(
|
||||
index: 10,
|
||||
enableString: EnableString.inline_class,
|
||||
isEnabledByDefault: IsEnabledByDefault.inline_class,
|
||||
isExpired: IsExpired.inline_class,
|
||||
documentation: 'Inline class',
|
||||
experimentalReleaseVersion: null,
|
||||
releaseVersion: null,
|
||||
);
|
||||
|
||||
static final macros = ExperimentalFeature(
|
||||
index: 11,
|
||||
enableString: EnableString.macros,
|
||||
isEnabledByDefault: IsEnabledByDefault.macros,
|
||||
isExpired: IsExpired.macros,
|
||||
|
@ -245,7 +255,7 @@ class ExperimentalFeatures {
|
|||
);
|
||||
|
||||
static final named_arguments_anywhere = ExperimentalFeature(
|
||||
index: 11,
|
||||
index: 12,
|
||||
enableString: EnableString.named_arguments_anywhere,
|
||||
isEnabledByDefault: IsEnabledByDefault.named_arguments_anywhere,
|
||||
isExpired: IsExpired.named_arguments_anywhere,
|
||||
|
@ -255,7 +265,7 @@ class ExperimentalFeatures {
|
|||
);
|
||||
|
||||
static final non_nullable = ExperimentalFeature(
|
||||
index: 12,
|
||||
index: 13,
|
||||
enableString: EnableString.non_nullable,
|
||||
isEnabledByDefault: IsEnabledByDefault.non_nullable,
|
||||
isExpired: IsExpired.non_nullable,
|
||||
|
@ -265,7 +275,7 @@ class ExperimentalFeatures {
|
|||
);
|
||||
|
||||
static final nonfunction_type_aliases = ExperimentalFeature(
|
||||
index: 13,
|
||||
index: 14,
|
||||
enableString: EnableString.nonfunction_type_aliases,
|
||||
isEnabledByDefault: IsEnabledByDefault.nonfunction_type_aliases,
|
||||
isExpired: IsExpired.nonfunction_type_aliases,
|
||||
|
@ -275,7 +285,7 @@ class ExperimentalFeatures {
|
|||
);
|
||||
|
||||
static final patterns = ExperimentalFeature(
|
||||
index: 14,
|
||||
index: 15,
|
||||
enableString: EnableString.patterns,
|
||||
isEnabledByDefault: IsEnabledByDefault.patterns,
|
||||
isExpired: IsExpired.patterns,
|
||||
|
@ -285,7 +295,7 @@ class ExperimentalFeatures {
|
|||
);
|
||||
|
||||
static final records = ExperimentalFeature(
|
||||
index: 15,
|
||||
index: 16,
|
||||
enableString: EnableString.records,
|
||||
isEnabledByDefault: IsEnabledByDefault.records,
|
||||
isExpired: IsExpired.records,
|
||||
|
@ -295,7 +305,7 @@ class ExperimentalFeatures {
|
|||
);
|
||||
|
||||
static final sealed_class = ExperimentalFeature(
|
||||
index: 16,
|
||||
index: 17,
|
||||
enableString: EnableString.sealed_class,
|
||||
isEnabledByDefault: IsEnabledByDefault.sealed_class,
|
||||
isExpired: IsExpired.sealed_class,
|
||||
|
@ -305,7 +315,7 @@ class ExperimentalFeatures {
|
|||
);
|
||||
|
||||
static final set_literals = ExperimentalFeature(
|
||||
index: 17,
|
||||
index: 18,
|
||||
enableString: EnableString.set_literals,
|
||||
isEnabledByDefault: IsEnabledByDefault.set_literals,
|
||||
isExpired: IsExpired.set_literals,
|
||||
|
@ -315,7 +325,7 @@ class ExperimentalFeatures {
|
|||
);
|
||||
|
||||
static final spread_collections = ExperimentalFeature(
|
||||
index: 18,
|
||||
index: 19,
|
||||
enableString: EnableString.spread_collections,
|
||||
isEnabledByDefault: IsEnabledByDefault.spread_collections,
|
||||
isExpired: IsExpired.spread_collections,
|
||||
|
@ -325,7 +335,7 @@ class ExperimentalFeatures {
|
|||
);
|
||||
|
||||
static final super_parameters = ExperimentalFeature(
|
||||
index: 19,
|
||||
index: 20,
|
||||
enableString: EnableString.super_parameters,
|
||||
isEnabledByDefault: IsEnabledByDefault.super_parameters,
|
||||
isExpired: IsExpired.super_parameters,
|
||||
|
@ -335,7 +345,7 @@ class ExperimentalFeatures {
|
|||
);
|
||||
|
||||
static final test_experiment = ExperimentalFeature(
|
||||
index: 20,
|
||||
index: 21,
|
||||
enableString: EnableString.test_experiment,
|
||||
isEnabledByDefault: IsEnabledByDefault.test_experiment,
|
||||
isExpired: IsExpired.test_experiment,
|
||||
|
@ -346,7 +356,7 @@ class ExperimentalFeatures {
|
|||
);
|
||||
|
||||
static final triple_shift = ExperimentalFeature(
|
||||
index: 21,
|
||||
index: 22,
|
||||
enableString: EnableString.triple_shift,
|
||||
isEnabledByDefault: IsEnabledByDefault.triple_shift,
|
||||
isExpired: IsExpired.triple_shift,
|
||||
|
@ -356,7 +366,7 @@ class ExperimentalFeatures {
|
|||
);
|
||||
|
||||
static final unnamed_libraries = ExperimentalFeature(
|
||||
index: 22,
|
||||
index: 23,
|
||||
enableString: EnableString.unnamed_libraries,
|
||||
isEnabledByDefault: IsEnabledByDefault.unnamed_libraries,
|
||||
isExpired: IsExpired.unnamed_libraries,
|
||||
|
@ -366,7 +376,7 @@ class ExperimentalFeatures {
|
|||
);
|
||||
|
||||
static final value_class = ExperimentalFeature(
|
||||
index: 23,
|
||||
index: 24,
|
||||
enableString: EnableString.value_class,
|
||||
isEnabledByDefault: IsEnabledByDefault.value_class,
|
||||
isExpired: IsExpired.value_class,
|
||||
|
@ -376,7 +386,7 @@ class ExperimentalFeatures {
|
|||
);
|
||||
|
||||
static final variance = ExperimentalFeature(
|
||||
index: 24,
|
||||
index: 25,
|
||||
enableString: EnableString.variance,
|
||||
isEnabledByDefault: IsEnabledByDefault.variance,
|
||||
isExpired: IsExpired.variance,
|
||||
|
@ -384,16 +394,6 @@ class ExperimentalFeatures {
|
|||
experimentalReleaseVersion: null,
|
||||
releaseVersion: null,
|
||||
);
|
||||
|
||||
static final views = ExperimentalFeature(
|
||||
index: 25,
|
||||
enableString: EnableString.views,
|
||||
isEnabledByDefault: IsEnabledByDefault.views,
|
||||
isExpired: IsExpired.views,
|
||||
documentation: 'Views',
|
||||
experimentalReleaseVersion: null,
|
||||
releaseVersion: null,
|
||||
);
|
||||
}
|
||||
|
||||
/// Constant bools indicating whether each experimental flag is currently
|
||||
|
@ -429,6 +429,9 @@ class IsEnabledByDefault {
|
|||
/// Default state of the experiment "inference-update-2"
|
||||
static const bool inference_update_2 = false;
|
||||
|
||||
/// Default state of the experiment "inline-class"
|
||||
static const bool inline_class = false;
|
||||
|
||||
/// Default state of the experiment "macros"
|
||||
static const bool macros = false;
|
||||
|
||||
|
@ -473,9 +476,6 @@ class IsEnabledByDefault {
|
|||
|
||||
/// Default state of the experiment "variance"
|
||||
static const bool variance = false;
|
||||
|
||||
/// Default state of the experiment "views"
|
||||
static const bool views = false;
|
||||
}
|
||||
|
||||
/// Constant bools indicating whether each experimental flag is currently
|
||||
|
@ -512,6 +512,9 @@ class IsExpired {
|
|||
/// Expiration status of the experiment "inference-update-2"
|
||||
static const bool inference_update_2 = false;
|
||||
|
||||
/// Expiration status of the experiment "inline-class"
|
||||
static const bool inline_class = false;
|
||||
|
||||
/// Expiration status of the experiment "macros"
|
||||
static const bool macros = false;
|
||||
|
||||
|
@ -556,9 +559,6 @@ class IsExpired {
|
|||
|
||||
/// Expiration status of the experiment "variance"
|
||||
static const bool variance = false;
|
||||
|
||||
/// Expiration status of the experiment "views"
|
||||
static const bool views = false;
|
||||
}
|
||||
|
||||
mixin _CurrentState {
|
||||
|
@ -598,6 +598,9 @@ mixin _CurrentState {
|
|||
bool get inference_update_2 =>
|
||||
isEnabled(ExperimentalFeatures.inference_update_2);
|
||||
|
||||
/// Current state for the flag "inline-class"
|
||||
bool get inline_class => isEnabled(ExperimentalFeatures.inline_class);
|
||||
|
||||
/// Current state for the flag "macros"
|
||||
bool get macros => isEnabled(ExperimentalFeatures.macros);
|
||||
|
||||
|
@ -647,8 +650,5 @@ mixin _CurrentState {
|
|||
/// Current state for the flag "variance"
|
||||
bool get variance => isEnabled(ExperimentalFeatures.variance);
|
||||
|
||||
/// Current state for the flag "views"
|
||||
bool get views => isEnabled(ExperimentalFeatures.views);
|
||||
|
||||
bool isEnabled(covariant ExperimentalFeature feature);
|
||||
}
|
||||
|
|
|
@ -144,7 +144,7 @@ class AstBuilder extends StackListener {
|
|||
final bool enableUnnamedLibraries;
|
||||
|
||||
/// `true` if views are enabled
|
||||
final bool enableViews;
|
||||
final bool enableInlineClass;
|
||||
|
||||
/// `true` if sealed-class is enabled
|
||||
final bool enableSealedClass;
|
||||
|
@ -173,7 +173,7 @@ class AstBuilder extends StackListener {
|
|||
enableRecords = _featureSet.isEnabled(Feature.records),
|
||||
enableUnnamedLibraries =
|
||||
_featureSet.isEnabled(Feature.unnamedLibraries),
|
||||
enableViews = _featureSet.isEnabled(Feature.views),
|
||||
enableInlineClass = _featureSet.isEnabled(Feature.inline_class),
|
||||
enableSealedClass = _featureSet.isEnabled(Feature.sealed_class),
|
||||
uri = uri ?? fileUri;
|
||||
|
||||
|
@ -236,10 +236,10 @@ class AstBuilder extends StackListener {
|
|||
macroToken = null;
|
||||
}
|
||||
}
|
||||
if (!enableViews) {
|
||||
if (!enableInlineClass) {
|
||||
if (viewToken != null) {
|
||||
_reportFeatureNotEnabled(
|
||||
feature: ExperimentalFeatures.views,
|
||||
feature: ExperimentalFeatures.inline_class,
|
||||
startToken: viewToken,
|
||||
);
|
||||
// Pretend that 'view' didn't occur while this feature is incomplete.
|
||||
|
@ -417,10 +417,10 @@ class AstBuilder extends StackListener {
|
|||
macroToken = null;
|
||||
}
|
||||
}
|
||||
if (!enableViews) {
|
||||
if (!enableInlineClass) {
|
||||
if (viewToken != null) {
|
||||
_reportFeatureNotEnabled(
|
||||
feature: ExperimentalFeatures.views,
|
||||
feature: ExperimentalFeatures.inline_class,
|
||||
startToken: viewToken,
|
||||
);
|
||||
// Pretend that 'view' didn't occur while this feature is incomplete.
|
||||
|
|
|
@ -49,6 +49,7 @@ class FeatureSets {
|
|||
flags: [
|
||||
EnableString.enhanced_enums,
|
||||
EnableString.extension_types,
|
||||
EnableString.inline_class,
|
||||
EnableString.macros,
|
||||
EnableString.named_arguments_anywhere,
|
||||
EnableString.patterns,
|
||||
|
@ -56,7 +57,6 @@ class FeatureSets {
|
|||
EnableString.sealed_class,
|
||||
EnableString.super_parameters,
|
||||
EnableString.unnamed_libraries,
|
||||
EnableString.views,
|
||||
],
|
||||
);
|
||||
|
||||
|
|
|
@ -139,6 +139,14 @@ class ExperimentalFlag {
|
|||
experimentEnabledVersion: const Version(3, 0),
|
||||
experimentReleasedVersion: const Version(3, 0));
|
||||
|
||||
static const ExperimentalFlag inlineClass = const ExperimentalFlag(
|
||||
name: 'inline-class',
|
||||
isEnabledByDefault: false,
|
||||
isExpired: false,
|
||||
enabledVersion: const Version(3, 0),
|
||||
experimentEnabledVersion: const Version(3, 0),
|
||||
experimentReleasedVersion: const Version(3, 0));
|
||||
|
||||
static const ExperimentalFlag macros = const ExperimentalFlag(
|
||||
name: 'macros',
|
||||
isEnabledByDefault: false,
|
||||
|
@ -258,14 +266,6 @@ class ExperimentalFlag {
|
|||
enabledVersion: const Version(3, 0),
|
||||
experimentEnabledVersion: const Version(3, 0),
|
||||
experimentReleasedVersion: const Version(3, 0));
|
||||
|
||||
static const ExperimentalFlag views = const ExperimentalFlag(
|
||||
name: 'views',
|
||||
isEnabledByDefault: false,
|
||||
isExpired: false,
|
||||
enabledVersion: const Version(3, 0),
|
||||
experimentEnabledVersion: const Version(3, 0),
|
||||
experimentReleasedVersion: const Version(3, 0));
|
||||
}
|
||||
|
||||
/// Interface for accessing the global state of experimental features.
|
||||
|
@ -358,6 +358,10 @@ class GlobalFeatures {
|
|||
GlobalFeature get inferenceUpdate2 => _inferenceUpdate2 ??=
|
||||
_computeGlobalFeature(ExperimentalFlag.inferenceUpdate2);
|
||||
|
||||
GlobalFeature? _inlineClass;
|
||||
GlobalFeature get inlineClass =>
|
||||
_inlineClass ??= _computeGlobalFeature(ExperimentalFlag.inlineClass);
|
||||
|
||||
GlobalFeature? _macros;
|
||||
GlobalFeature get macros =>
|
||||
_macros ??= _computeGlobalFeature(ExperimentalFlag.macros);
|
||||
|
@ -417,10 +421,6 @@ class GlobalFeatures {
|
|||
GlobalFeature? _variance;
|
||||
GlobalFeature get variance =>
|
||||
_variance ??= _computeGlobalFeature(ExperimentalFlag.variance);
|
||||
|
||||
GlobalFeature? _views;
|
||||
GlobalFeature get views =>
|
||||
_views ??= _computeGlobalFeature(ExperimentalFlag.views);
|
||||
}
|
||||
|
||||
/// Interface for accessing the state of experimental features within a
|
||||
|
@ -492,6 +492,11 @@ class LibraryFeatures {
|
|||
_inferenceUpdate2 ??= globalFeatures._computeLibraryFeature(
|
||||
ExperimentalFlag.inferenceUpdate2, canonicalUri, libraryVersion);
|
||||
|
||||
LibraryFeature? _inlineClass;
|
||||
LibraryFeature get inlineClass =>
|
||||
_inlineClass ??= globalFeatures._computeLibraryFeature(
|
||||
ExperimentalFlag.inlineClass, canonicalUri, libraryVersion);
|
||||
|
||||
LibraryFeature? _macros;
|
||||
LibraryFeature get macros =>
|
||||
_macros ??= globalFeatures._computeLibraryFeature(
|
||||
|
@ -571,10 +576,6 @@ class LibraryFeatures {
|
|||
_variance ??= globalFeatures._computeLibraryFeature(
|
||||
ExperimentalFlag.variance, canonicalUri, libraryVersion);
|
||||
|
||||
LibraryFeature? _views;
|
||||
LibraryFeature get views => _views ??= globalFeatures._computeLibraryFeature(
|
||||
ExperimentalFlag.views, canonicalUri, libraryVersion);
|
||||
|
||||
/// Returns the [LibraryFeature] corresponding to [experimentalFlag].
|
||||
LibraryFeature fromSharedExperimentalFlags(
|
||||
shared.ExperimentalFlag experimentalFlag) {
|
||||
|
@ -599,6 +600,8 @@ class LibraryFeatures {
|
|||
return inferenceUpdate1;
|
||||
case shared.ExperimentalFlag.inferenceUpdate2:
|
||||
return inferenceUpdate2;
|
||||
case shared.ExperimentalFlag.inlineClass:
|
||||
return inlineClass;
|
||||
case shared.ExperimentalFlag.macros:
|
||||
return macros;
|
||||
case shared.ExperimentalFlag.namedArgumentsAnywhere:
|
||||
|
@ -629,8 +632,6 @@ class LibraryFeatures {
|
|||
return valueClass;
|
||||
case shared.ExperimentalFlag.variance:
|
||||
return variance;
|
||||
case shared.ExperimentalFlag.views:
|
||||
return views;
|
||||
default:
|
||||
throw new UnsupportedError(
|
||||
'LibraryFeatures.fromSharedExperimentalFlags($experimentalFlag)');
|
||||
|
@ -662,6 +663,8 @@ ExperimentalFlag? parseExperimentalFlag(String flag) {
|
|||
return ExperimentalFlag.inferenceUpdate1;
|
||||
case "inference-update-2":
|
||||
return ExperimentalFlag.inferenceUpdate2;
|
||||
case "inline-class":
|
||||
return ExperimentalFlag.inlineClass;
|
||||
case "macros":
|
||||
return ExperimentalFlag.macros;
|
||||
case "named-arguments-anywhere":
|
||||
|
@ -692,8 +695,6 @@ ExperimentalFlag? parseExperimentalFlag(String flag) {
|
|||
return ExperimentalFlag.valueClass;
|
||||
case "variance":
|
||||
return ExperimentalFlag.variance;
|
||||
case "views":
|
||||
return ExperimentalFlag.views;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -721,6 +722,7 @@ final Map<ExperimentalFlag, bool> defaultExperimentalFlags = {
|
|||
ExperimentalFlag.inferenceUpdate1.isEnabledByDefault,
|
||||
ExperimentalFlag.inferenceUpdate2:
|
||||
ExperimentalFlag.inferenceUpdate2.isEnabledByDefault,
|
||||
ExperimentalFlag.inlineClass: ExperimentalFlag.inlineClass.isEnabledByDefault,
|
||||
ExperimentalFlag.macros: ExperimentalFlag.macros.isEnabledByDefault,
|
||||
ExperimentalFlag.namedArgumentsAnywhere:
|
||||
ExperimentalFlag.namedArgumentsAnywhere.isEnabledByDefault,
|
||||
|
@ -742,7 +744,6 @@ final Map<ExperimentalFlag, bool> defaultExperimentalFlags = {
|
|||
ExperimentalFlag.unnamedLibraries.isEnabledByDefault,
|
||||
ExperimentalFlag.valueClass: ExperimentalFlag.valueClass.isEnabledByDefault,
|
||||
ExperimentalFlag.variance: ExperimentalFlag.variance.isEnabledByDefault,
|
||||
ExperimentalFlag.views: ExperimentalFlag.views.isEnabledByDefault,
|
||||
};
|
||||
const AllowedExperimentalFlags defaultAllowedExperimentalFlags =
|
||||
const AllowedExperimentalFlags(sdkDefaultExperiments: {
|
||||
|
@ -940,6 +941,7 @@ const Map<shared.ExperimentalFlag, ExperimentalFlag> sharedExperimentalFlags = {
|
|||
shared.ExperimentalFlag.genericMetadata: ExperimentalFlag.genericMetadata,
|
||||
shared.ExperimentalFlag.inferenceUpdate1: ExperimentalFlag.inferenceUpdate1,
|
||||
shared.ExperimentalFlag.inferenceUpdate2: ExperimentalFlag.inferenceUpdate2,
|
||||
shared.ExperimentalFlag.inlineClass: ExperimentalFlag.inlineClass,
|
||||
shared.ExperimentalFlag.macros: ExperimentalFlag.macros,
|
||||
shared.ExperimentalFlag.namedArgumentsAnywhere:
|
||||
ExperimentalFlag.namedArgumentsAnywhere,
|
||||
|
@ -957,5 +959,4 @@ const Map<shared.ExperimentalFlag, ExperimentalFlag> sharedExperimentalFlags = {
|
|||
shared.ExperimentalFlag.unnamedLibraries: ExperimentalFlag.unnamedLibraries,
|
||||
shared.ExperimentalFlag.valueClass: ExperimentalFlag.valueClass,
|
||||
shared.ExperimentalFlag.variance: ExperimentalFlag.variance,
|
||||
shared.ExperimentalFlag.views: ExperimentalFlag.views,
|
||||
};
|
||||
|
|
|
@ -883,8 +883,8 @@ class OutlineBuilder extends StackListenerImpl {
|
|||
}
|
||||
}
|
||||
if (viewToken != null) {
|
||||
if (reportIfNotEnabled(
|
||||
libraryFeatures.views, viewToken.charOffset, viewToken.length)) {
|
||||
if (reportIfNotEnabled(libraryFeatures.inlineClass, viewToken.charOffset,
|
||||
viewToken.length)) {
|
||||
viewToken = null;
|
||||
}
|
||||
}
|
||||
|
@ -1013,8 +1013,8 @@ class OutlineBuilder extends StackListenerImpl {
|
|||
}
|
||||
}
|
||||
if (viewToken != null) {
|
||||
if (reportIfNotEnabled(
|
||||
libraryFeatures.views, viewToken.charOffset, viewToken.length)) {
|
||||
if (reportIfNotEnabled(libraryFeatures.inlineClass, viewToken.charOffset,
|
||||
viewToken.length)) {
|
||||
viewToken = null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,13 +2,13 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/general/view_class_declaration.dart:8:1: Error: This requires the experimental 'views' language feature to be enabled.
|
||||
// Try passing the '--enable-experiment=views' command line option.
|
||||
// pkg/front_end/testcases/general/view_class_declaration.dart:8:1: Error: This requires the experimental 'inline-class' language feature to be enabled.
|
||||
// Try passing the '--enable-experiment=inline-class' command line option.
|
||||
// view class Class1 {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/view_class_declaration.dart:9:1: Error: This requires the experimental 'views' language feature to be enabled.
|
||||
// Try passing the '--enable-experiment=views' command line option.
|
||||
// pkg/front_end/testcases/general/view_class_declaration.dart:9:1: Error: This requires the experimental 'inline-class' language feature to be enabled.
|
||||
// Try passing the '--enable-experiment=inline-class' command line option.
|
||||
// view class Class2 = Object with Mixin;
|
||||
// ^^^^
|
||||
//
|
||||
|
|
|
@ -2,13 +2,13 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/general/view_class_declaration.dart:8:1: Error: This requires the experimental 'views' language feature to be enabled.
|
||||
// Try passing the '--enable-experiment=views' command line option.
|
||||
// pkg/front_end/testcases/general/view_class_declaration.dart:8:1: Error: This requires the experimental 'inline-class' language feature to be enabled.
|
||||
// Try passing the '--enable-experiment=inline-class' command line option.
|
||||
// view class Class1 {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/view_class_declaration.dart:9:1: Error: This requires the experimental 'views' language feature to be enabled.
|
||||
// Try passing the '--enable-experiment=views' command line option.
|
||||
// pkg/front_end/testcases/general/view_class_declaration.dart:9:1: Error: This requires the experimental 'inline-class' language feature to be enabled.
|
||||
// Try passing the '--enable-experiment=inline-class' command line option.
|
||||
// view class Class2 = Object with Mixin;
|
||||
// ^^^^
|
||||
//
|
||||
|
|
|
@ -2,13 +2,13 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/general/view_class_declaration.dart:8:1: Error: This requires the experimental 'views' language feature to be enabled.
|
||||
// Try passing the '--enable-experiment=views' command line option.
|
||||
// pkg/front_end/testcases/general/view_class_declaration.dart:8:1: Error: This requires the experimental 'inline-class' language feature to be enabled.
|
||||
// Try passing the '--enable-experiment=inline-class' command line option.
|
||||
// view class Class1 {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/view_class_declaration.dart:9:1: Error: This requires the experimental 'views' language feature to be enabled.
|
||||
// Try passing the '--enable-experiment=views' command line option.
|
||||
// pkg/front_end/testcases/general/view_class_declaration.dart:9:1: Error: This requires the experimental 'inline-class' language feature to be enabled.
|
||||
// Try passing the '--enable-experiment=inline-class' command line option.
|
||||
// view class Class2 = Object with Mixin;
|
||||
// ^^^^
|
||||
//
|
||||
|
|
|
@ -2,13 +2,13 @@ library /*isNonNullableByDefault*/;
|
|||
//
|
||||
// Problems in library:
|
||||
//
|
||||
// pkg/front_end/testcases/general/view_class_declaration.dart:8:1: Error: This requires the experimental 'views' language feature to be enabled.
|
||||
// Try passing the '--enable-experiment=views' command line option.
|
||||
// pkg/front_end/testcases/general/view_class_declaration.dart:8:1: Error: This requires the experimental 'inline-class' language feature to be enabled.
|
||||
// Try passing the '--enable-experiment=inline-class' command line option.
|
||||
// view class Class1 {}
|
||||
// ^^^^
|
||||
//
|
||||
// pkg/front_end/testcases/general/view_class_declaration.dart:9:1: Error: This requires the experimental 'views' language feature to be enabled.
|
||||
// Try passing the '--enable-experiment=views' command line option.
|
||||
// pkg/front_end/testcases/general/view_class_declaration.dart:9:1: Error: This requires the experimental 'inline-class' language feature to be enabled.
|
||||
// Try passing the '--enable-experiment=inline-class' command line option.
|
||||
// view class Class2 = Object with Mixin;
|
||||
// ^^^^
|
||||
//
|
||||
|
|
|
@ -1 +1 @@
|
|||
--enable-experiment=views
|
||||
--enable-experiment=inline-class
|
|
@ -137,8 +137,8 @@ features:
|
|||
patterns:
|
||||
help: "Patterns"
|
||||
|
||||
views:
|
||||
help: "Views"
|
||||
inline-class:
|
||||
help: "Inline class"
|
||||
|
||||
sealed-class:
|
||||
help: "Sealed class"
|
||||
|
|
Loading…
Reference in a new issue