Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1056)

Unified Diff: pkg/analyzer/lib/src/generated/engine.dart

Issue 2976963002: Add --no-declaration-casts option to analyzer. (Closed)
Patch Set: Fix comment Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/lib/src/generated/engine.dart
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index d149ffcc1d26ee6d6a7885a57aeb2fc2540f2514..0922817ad5adccd83a0501e8c5e1bdff278b8108 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -1361,6 +1361,14 @@ class AnalysisOptionsImpl implements AnalysisOptions {
*/
Uint32List _signature;
+ /**
+ * A flag indicating whether declaration casts are allowed in [strongMode]
+ * (they are always allowed in Dart 1.0 mode).
+ *
+ * This option is experimental and subject to change.
+ */
+ bool declarationCasts = true;
+
@override
@deprecated
int cacheSize = 64;
@@ -1491,6 +1499,7 @@ class AnalysisOptionsImpl implements AnalysisOptions {
preserveComments = options.preserveComments;
strongMode = options.strongMode;
if (options is AnalysisOptionsImpl) {
+ declarationCasts = options.declarationCasts;
strongModeHints = options.strongModeHints;
implicitCasts = options.implicitCasts;
nonnullableTypes = options.nonnullableTypes;
@@ -1607,6 +1616,7 @@ class AnalysisOptionsImpl implements AnalysisOptions {
ApiSignature buffer = new ApiSignature();
// Append boolean flags.
+ buffer.addBool(declarationCasts);
buffer.addBool(enableAssertInitializer);
buffer.addBool(enableLazyAssignmentOperators);
buffer.addBool(enableStrictCallChecks);
@@ -1638,6 +1648,7 @@ class AnalysisOptionsImpl implements AnalysisOptions {
@override
void resetToDefaults() {
+ declarationCasts = true;
dart2jsHint = false;
disableCacheFlushing = false;
enableAssertInitializer = false;
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart ('k') | pkg/analyzer/lib/src/generated/error_verifier.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698