From 7df3cd3cfdd48fa5c4b7f06dd3941bffca38908f Mon Sep 17 00:00:00 2001 From: Konstantin Shcheglov Date: Wed, 6 Jul 2022 15:55:50 +0000 Subject: [PATCH] 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 Reviewed-by: Brian Wilkerson Commit-Queue: Konstantin Shcheglov --- .../lib/src/dart/analysis/library_analyzer.dart | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart b/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart index 66dd382a6d9..33a041e00d9 100644 --- a/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart +++ b/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart @@ -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 _findConstants(CompilationUnit unit) { ConstantFinder constantFinder = ConstantFinder();