| Index: pkg/analyzer/lib/src/task/strong/checker.dart
|
| diff --git a/pkg/analyzer/lib/src/task/strong/checker.dart b/pkg/analyzer/lib/src/task/strong/checker.dart
|
| index aadab6c32189de5b4fad1a41cd0aecef68ffd33d..dab56d1138878615b469613aef1e9a380a26a9d4 100644
|
| --- a/pkg/analyzer/lib/src/task/strong/checker.dart
|
| +++ b/pkg/analyzer/lib/src/task/strong/checker.dart
|
| @@ -583,8 +583,13 @@ class CodeChecker extends RecursiveAstVisitor {
|
| @override
|
| void visitRedirectingConstructorInvocation(
|
| RedirectingConstructorInvocation node) {
|
| - var type = node.staticElement.type;
|
| - checkArgumentList(node.argumentList, type);
|
| + var type = node.staticElement?.type;
|
| + // TODO(leafp): There's a TODO in visitRedirectingConstructorInvocation
|
| + // in the element_resolver to handle the case that the element is null
|
| + // and emit an error. In the meantime, just be defensive here.
|
| + if (type != null) {
|
| + checkArgumentList(node.argumentList, type);
|
| + }
|
| node.visitChildren(this);
|
| }
|
|
|
|
|