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

Unified Diff: lib/src/checker/resolver.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/checker/checker.dart ('k') | lib/src/compiler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/checker/resolver.dart
diff --git a/lib/src/checker/resolver.dart b/lib/src/checker/resolver.dart
index fe394fb03e2628b392107bc970357f69e92de348..d15a3b63e23288afdbd2cf71b8d0ea08a83b1d5d 100644
--- a/lib/src/checker/resolver.dart
+++ b/lib/src/checker/resolver.dart
@@ -160,23 +160,17 @@ class LibraryResolverWithInference extends LibraryResolver {
if (supertypeClass != null) visit(supertypeClass);
}
- if (_options.inferFromOverrides) {
- // Infer field types from overrides first, otherwise from initializers.
- var pending = new Set<VariableDeclaration>();
- cls.members
- .where(_isInstanceField)
- .forEach((f) => _inferFieldTypeFromOverride(f, pending));
- if (pending.isNotEmpty) _inferVariableFromInitializer(pending);
-
- // Infer return-types and param-types from overrides
- cls.members
- .where((m) => m is MethodDeclaration && !m.isStatic)
- .forEach(_inferMethodTypesFromOverride);
- } else {
- _inferVariableFromInitializer(cls.members
- .where(_isInstanceField)
- .expand((f) => f.fields.variables));
- }
+ // Infer field types from overrides first, otherwise from initializers.
+ var pending = new Set<VariableDeclaration>();
+ cls.members
+ .where(_isInstanceField)
+ .forEach((f) => _inferFieldTypeFromOverride(f, pending));
+ if (pending.isNotEmpty) _inferVariableFromInitializer(pending);
+
+ // Infer return-types and param-types from overrides
+ cls.members
+ .where((m) => m is MethodDeclaration && !m.isStatic)
+ .forEach(_inferMethodTypesFromOverride);
}
classes.forEach(visit);
}
« no previous file with comments | « lib/src/checker/checker.dart ('k') | lib/src/compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698