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

Unified Diff: lib/strong_mode.dart

Issue 1398873002: remove "infer from overrides" option which is now obsolete (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 2 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 | « lib/src/compiler.dart ('k') | test/checker/checker_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/strong_mode.dart
diff --git a/lib/strong_mode.dart b/lib/strong_mode.dart
index 9565b83107dd707b357d9a518553476c7b4faf4d..f1ef58c4c4d4d245d37530636d11f3a912aa1464 100644
--- a/lib/strong_mode.dart
+++ b/lib/strong_mode.dart
@@ -45,7 +45,7 @@ class StrongChecker {
.instance.useTaskModel) enableDevCompilerInference(context, options);
var rules = new RestrictedRules(context.typeProvider, options: options);
var reporter = new _ErrorCollector(options.hints);
- var checker = new CodeChecker(rules, reporter, options);
+ var checker = new CodeChecker(rules, reporter);
return new StrongChecker._(context, checker, reporter);
}
@@ -79,10 +79,6 @@ class _ErrorCollector implements AnalysisErrorListener {
}
class StrongModeOptions {
- /// Whether to infer return types and field types from overridden members.
- final bool inferFromOverrides;
- static const inferFromOverridesDefault = true;
-
/// Whether to infer types for consts and fields by looking at initializers on
/// the RHS. For example, in a constant declaration like:
///
@@ -123,7 +119,6 @@ class StrongModeOptions {
const StrongModeOptions(
{this.hints: false,
- this.inferFromOverrides: inferFromOverridesDefault,
this.inferTransitively: inferTransitivelyDefault,
this.onlyInferConstsAndFinalFields: onlyInferConstAndFinalFieldsDefault,
this.inferDownwards: inferDownwardsDefault,
@@ -133,7 +128,6 @@ class StrongModeOptions {
StrongModeOptions.fromArguments(ArgResults args, {String prefix: ''})
: relaxedCasts = args[prefix + 'relaxed-casts'],
inferDownwards = args[prefix + 'infer-downwards'],
- inferFromOverrides = args[prefix + 'infer-from-overrides'],
inferTransitively = args[prefix + 'infer-transitively'],
onlyInferConstsAndFinalFields = args[prefix + 'infer-only-finals'],
nonnullableTypes = _optionsToList(args[prefix + 'nonnullable'],
@@ -160,11 +154,6 @@ class StrongModeOptions {
help: 'Infer types downwards from local context',
defaultsTo: inferDownwardsDefault,
hide: hide)
- ..addFlag(prefix + 'infer-from-overrides',
- help: 'Infer unspecified types of fields and return types from\n'
- 'definitions in supertypes',
- defaultsTo: inferFromOverridesDefault,
- hide: hide)
..addFlag(prefix + 'infer-transitively',
help: 'Infer consts/fields from definitions in other libraries',
defaultsTo: inferTransitivelyDefault,
@@ -178,8 +167,7 @@ class StrongModeOptions {
bool operator ==(Object other) {
if (other is! StrongModeOptions) return false;
StrongModeOptions s = other;
- return inferFromOverrides == s.inferFromOverrides &&
- inferTransitively == s.inferTransitively &&
+ return inferTransitively == s.inferTransitively &&
onlyInferConstsAndFinalFields == s.onlyInferConstsAndFinalFields &&
inferDownwards == s.inferDownwards &&
relaxedCasts == s.relaxedCasts &&
« no previous file with comments | « lib/src/compiler.dart ('k') | test/checker/checker_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698