| Index: pkg/analyzer/lib/src/generated/static_type_analyzer.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
|
| index 1c5b9996a579c52c77f2cc605950147e4ee57ab8..d7eed746e551c3ffb2064e52e6b7d903716c1c86 100644
|
| --- a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
|
| +++ b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
|
| @@ -1333,6 +1333,11 @@ class StaticTypeAnalyzer extends SimpleAstVisitor<Object> {
|
| } else if (element is VariableElement) {
|
| VariableElement variable = element;
|
| staticType = _promoteManager.getStaticType(variable);
|
| + if (_resolver.instrumentation != null && node.inGetterContext()) {
|
| + node.inGetterContext();
|
| + DartType type = _promoteManager.getType(variable);
|
| + _resolver.instrumentation.recordPromotion(node.offset, type);
|
| + }
|
| } else if (element is PrefixElement) {
|
| return null;
|
| } else if (element is DynamicElementImpl) {
|
| @@ -2097,6 +2102,7 @@ class StaticTypeAnalyzer extends SimpleAstVisitor<Object> {
|
| if (type != null && !type.isBottom && !type.isDartCoreNull) {
|
| VariableElement element = node.element;
|
| if (element is LocalVariableElementImpl) {
|
| + _resolver.instrumentation?.recordInference(node.name.offset, type);
|
| element.type = initializer.staticType;
|
| node.name.staticType = initializer.staticType;
|
| }
|
|
|