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

Unified Diff: lib/src/options.dart

Issue 980103002: Disable infer-from-overrides by default (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | lib/src/testing.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/options.dart
diff --git a/lib/src/options.dart b/lib/src/options.dart
index f8a7d426d9b453b7c815f974724ffe111edf97db..377477b39df022c0ca0a5d1da32940d53b59085f 100644
--- a/lib/src/options.dart
+++ b/lib/src/options.dart
@@ -25,6 +25,7 @@ class ResolverOptions {
/// Whether to infer return types and field types from overriden members.
final bool inferFromOverrides;
+ static const bool INFER_FROM_OVERRIDES_DEFAULT = false;
vsm 2015/03/05 03:58:56 Trying to make one place to set this so it's easy
/// Whether to infer types for consts and static fields by looking at
/// identifiers on the RHS. For example, in a constant declaration like:
@@ -54,7 +55,8 @@ class ResolverOptions {
final bool onlyInferConstsAndFinalFields;
ResolverOptions({this.useMultiPackage: false, this.packageRoot: 'packages/',
- this.packagePaths: const <String>[], this.inferFromOverrides: true,
+ this.packagePaths: const <String>[],
+ this.inferFromOverrides: INFER_FROM_OVERRIDES_DEFAULT,
this.inferStaticsFromIdentifiers: false,
this.inferInNonStableOrder: false,
this.onlyInferConstsAndFinalFields: false});
@@ -204,7 +206,8 @@ class CompilerOptions implements RulesOptions, ResolverOptions, JSCodeOptions {
this.outputDart: false, this.useColors: true,
this.covariantGenerics: true, this.relaxedCasts: true,
this.useMultiPackage: false, this.packageRoot: 'packages/',
- this.packagePaths: const <String>[], this.inferFromOverrides: true,
+ this.packagePaths: const <String>[],
+ this.inferFromOverrides: ResolverOptions.INFER_FROM_OVERRIDES_DEFAULT,
this.inferStaticsFromIdentifiers: false,
this.inferInNonStableOrder: false,
this.onlyInferConstsAndFinalFields: false,
@@ -277,7 +280,8 @@ final ArgParser argParser = new ArgParser()
defaultsTo: null)
..addFlag('infer-from-overrides',
help: 'Infer unspecified types of fields and return types from '
- 'definitions in supertypes', defaultsTo: true)
+ 'definitions in supertypes',
+ defaultsTo: ResolverOptions.INFER_FROM_OVERRIDES_DEFAULT)
..addFlag('infer-transitively',
help: 'Infer consts/fields from definitions in other libraries',
defaultsTo: false)
« no previous file with comments | « no previous file | lib/src/testing.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698