| Index: pkg/analyzer/lib/src/generated/constant.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/constant.dart b/pkg/analyzer/lib/src/generated/constant.dart
|
| index 2c00d92c9ba5cca3a86a755a4d4859816cc4be36..fa82b571354fa9a9dfddd115497662bb5c6f0982 100644
|
| --- a/pkg/analyzer/lib/src/generated/constant.dart
|
| +++ b/pkg/analyzer/lib/src/generated/constant.dart
|
| @@ -791,6 +791,15 @@ class ConstantValueComputer {
|
| superName = name.name;
|
| }
|
| superArguments = superConstructorInvocation.argumentList.arguments;
|
| + } else if (initializer is RedirectingConstructorInvocation) {
|
| + // This is a redirecting constructor, so just evaluate the constructor
|
| + // it redirects to.
|
| + ConstructorElement constructor = initializer.staticElement;
|
| + if (constructor != null && constructor.isConst) {
|
| + return _evaluateConstructorCall(
|
| + node, initializer.argumentList.arguments, constructor,
|
| + initializerVisitor, errorReporter);
|
| + }
|
| }
|
| }
|
| // Evaluate explicit or implicit call to super().
|
| @@ -915,6 +924,15 @@ class ConstantValueComputer_InitializerCloner extends AstCloner {
|
| invocation.staticElement = node.staticElement;
|
| return invocation;
|
| }
|
| +
|
| + @override
|
| + RedirectingConstructorInvocation visitRedirectingConstructorInvocation(
|
| + RedirectingConstructorInvocation node) {
|
| + RedirectingConstructorInvocation invocation =
|
| + super.visitRedirectingConstructorInvocation(node);
|
| + invocation.staticElement = node.staticElement;
|
| + return invocation;
|
| + }
|
| }
|
|
|
| /**
|
| @@ -4458,6 +4476,19 @@ class ReferenceFinder extends RecursiveAstVisitor<Object> {
|
| }
|
| return null;
|
| }
|
| +
|
| + @override
|
| + Object visitRedirectingConstructorInvocation(RedirectingConstructorInvocation node) {
|
| + super.visitRedirectingConstructorInvocation(node);
|
| + ConstructorElement target = node.staticElement;
|
| + if (target != null && target.isConst) {
|
| + ConstructorDeclaration targetDeclaration = _constructorDeclarationMap[target];
|
| + if (targetDeclaration != null) {
|
| + _referenceGraph.addEdge(_source, targetDeclaration);
|
| + }
|
| + }
|
| + return null;
|
| + }
|
| }
|
|
|
| /**
|
|
|