Deprecate "--enable-null-aware-operators".
As of analyzer 0.25.2, this option is no longer needed; null-aware
operators are always enabled.
diff --git a/lib/src/driver.dart b/lib/src/driver.dart
index 7d6f002..57fd9e5 100644
--- a/lib/src/driver.dart
+++ b/lib/src/driver.dart
@@ -178,10 +178,6 @@
if (options.disableHints != _previousOptions.disableHints) {
return false;
}
- if (options.enableNullAwareOperators !=
- _previousOptions.enableNullAwareOperators) {
- return false;
- }
if (options.enableStrictCallChecks !=
_previousOptions.enableStrictCallChecks) {
return false;
@@ -361,7 +357,6 @@
AnalysisOptionsImpl contextOptions = new AnalysisOptionsImpl();
contextOptions.cacheSize = _maxCacheSize;
contextOptions.hint = !options.disableHints;
- contextOptions.enableNullAwareOperators = options.enableNullAwareOperators;
contextOptions.enableStrictCallChecks = options.enableStrictCallChecks;
contextOptions.analyzeFunctionBodiesPredicate = dietParsingPolicy;
contextOptions.generateImplicitErrors = options.showPackageWarnings;
diff --git a/lib/src/options.dart b/lib/src/options.dart
index f2075c5..345eb94 100644
--- a/lib/src/options.dart
+++ b/lib/src/options.dart
@@ -153,7 +153,12 @@
}
}
- // OK
+ // OK. Report deprecated options.
+ if (options.enableNullAwareOperators) {
+ print(
+ "Info: Option '--enable-null-aware-operators' is no longer needed. Null aware operators are supported by default.");
+ }
+
return options;
}
@@ -271,9 +276,7 @@
// TODO(jmesserly): link to a spec+explainer for these checks.
..addFlag('strong', help: 'Enable strong static checks.', hide: true)
..addFlag('strong-hints',
- help: 'Enable hints about dynamic operations.',
- hide: true);
-
+ help: 'Enable hints about dynamic operations.', hide: true);
try {
// TODO(scheglov) https://code.google.com/p/dart/issues/detail?id=11061