| 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);
|
| }
|
|
|