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 d144c76f7557c75bf2a87f763ba3b1a0467e231b..f68147180e5529973e12766669e0348cd963a001 100644 |
--- a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart |
+++ b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart |
@@ -2011,7 +2011,11 @@ class StaticTypeAnalyzer extends SimpleAstVisitor<Object> { |
arguments.correspondingStaticParameters = ResolverVisitor |
.resolveArgumentsToParameters(arguments, inferred.parameters, null); |
inferConstructorName(constructor, inferred.returnType); |
- // TODO(jmesserly): should we fix up the staticElement as well? |
+ // Update the static element as well. This is used in some cases, such as |
+ // computing constant values. It is stored in two places. |
+ constructor.staticElement = |
+ ConstructorMember.from(rawElement, inferred.returnType); |
+ node.staticElement = constructor.staticElement; |
} |
} |