| Index: pkg/analyzer/lib/src/generated/resolver.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
|
| index d8106f6fb3ceae6d13e88064ac532c36451d7617..952323dd1197c80bce047e67d39dc7d70ba9e964 100644
|
| --- a/pkg/analyzer/lib/src/generated/resolver.dart
|
| +++ b/pkg/analyzer/lib/src/generated/resolver.dart
|
| @@ -11433,14 +11433,18 @@ class ResolverVisitor extends ScopedVisitor {
|
| allowPrecisionLoss ||
|
| !currentType.isMoreSpecificThan(potentialType) ||
|
| potentialType.isMoreSpecificThan(currentType)) {
|
| - if (element is PropertyInducingElement) {
|
| - PropertyInducingElement variable = element;
|
| - if (!variable.isConst && !variable.isFinal) {
|
| - return;
|
| - }
|
| - (variable as PropertyInducingElementImpl).propagatedType =
|
| - potentialType;
|
| - }
|
| + // TODO(scheglov) type propagation for instance/top-level fields
|
| + // was disabled because it depends on the order or visiting.
|
| + // If both field and its client are in the same unit, and we visit
|
| + // the client before the field, then propagated type is not set yet.
|
| +// if (element is PropertyInducingElement) {
|
| +// PropertyInducingElement variable = element;
|
| +// if (!variable.isConst && !variable.isFinal) {
|
| +// return;
|
| +// }
|
| +// (variable as PropertyInducingElementImpl).propagatedType =
|
| +// potentialType;
|
| +// }
|
| _overrideManager.setType(element, potentialType);
|
| }
|
| }
|
|
|