mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 23:29:47 +00:00
Always pass --default-language-version=2.7 to analyzer for legacy tests.
Change-Id: I2adca91ce34a343a6dd21aeb891ec041283f3365 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135529 Auto-Submit: Bob Nystrom <rnystrom@google.com> Reviewed-by: Paul Berry <paulberry@google.com> Commit-Queue: Bob Nystrom <rnystrom@google.com>
This commit is contained in:
parent
0a57671f90
commit
ca6cb6ce75
|
@ -962,12 +962,9 @@ class AnalyzerCompilerConfiguration extends CompilerConfiguration {
|
|||
|
||||
// If we are running a legacy test with NNBD enabled, tell analyzer to use
|
||||
// a pre-NNBD language version for the test.
|
||||
var setLegacyVersion = false;
|
||||
if (_configuration.experiments.contains("non-nullable")) {
|
||||
var testPath = arguments.last;
|
||||
var segments = Path(testPath).relativeTo(Repository.dir).segments();
|
||||
setLegacyVersion = segments.any(legacyTestDirectories.contains);
|
||||
}
|
||||
var testPath = arguments.last;
|
||||
var segments = Path(testPath).relativeTo(Repository.dir).segments();
|
||||
var setLegacyVersion = segments.any(legacyTestDirectories.contains);
|
||||
|
||||
var args = [
|
||||
...arguments,
|
||||
|
|
Loading…
Reference in a new issue