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 1fb7b7f57346b2c02b031aabee39653bc6351e6a..d99506966cc9c041f478f62078785813888c7e68 100644 |
--- a/pkg/analyzer/lib/src/generated/constant.dart |
+++ b/pkg/analyzer/lib/src/generated/constant.dart |
@@ -427,6 +427,15 @@ class ConstantEvaluationEngine { |
ConstantEvaluationEngine._getConstructorBase(redirectedConstructor); |
callback(redirectedConstructorBase); |
return; |
+ } else if (constant.isFactory) { |
+ // Factory constructor, but getConstRedirectedConstructor returned |
+ // null. This can happen if we're visiting one of the special external |
+ // const factory constructors in the SDK, or if the code contains |
+ // errors (such as delegating to a non-const constructor, or delegating |
+ // to a constructor that can't be resolved). In any of these cases, |
+ // we'll evaluate calls to this constructor without having to refer to |
+ // any other constants. So we don't need to report any dependencies. |
+ return; |
} |
bool superInvocationFound = false; |
List<ConstructorInitializer> initializers = constant.constantInitializers; |