Feature sets inconsistency is implemented as INCONSISTENT_LANGUAGE_VERSION_OVERRIDE.

Change-Id: I6eadfcb4706f5739afaac20ca0397f4335a7db96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250443
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
Konstantin Shcheglov 2022-07-06 15:55:50 +00:00 committed by Commit Bot
parent 5a067e91bb
commit 7df3cd3cfd

View file

@ -545,11 +545,6 @@ class LibraryAnalyzer {
}
// Resolve URIs in directives to corresponding sources.
final featureSet = _libraryElement.featureSet;
units.forEach((file, unit) {
_validateFeatureSet(unit, featureSet);
});
_resolveDirectives(units, libraryUnit);
units.forEach((file, unit) {
@ -915,15 +910,6 @@ class LibraryAnalyzer {
}
}
/// Validate that the feature set associated with the compilation [unit] is
/// the same as the [expectedSet] of features supported by the library.
void _validateFeatureSet(CompilationUnit unit, FeatureSet expectedSet) {
FeatureSet actualSet = unit.featureSet;
if (actualSet != expectedSet) {
// TODO(brianwilkerson) Generate a diagnostic.
}
}
/// Find constants in [unit] to compute.
static List<ConstantEvaluationTarget> _findConstants(CompilationUnit unit) {
ConstantFinder constantFinder = ConstantFinder();