Index: pkg/analyzer/lib/src/dart/ast/ast.dart |
diff --git a/pkg/analyzer/lib/src/dart/ast/ast.dart b/pkg/analyzer/lib/src/dart/ast/ast.dart |
index 97defa61517fef5041fa2e061c9cc2750fb57ff9..6be013c362327fb74f5b658b9100e39d6bcff5b8 100644 |
--- a/pkg/analyzer/lib/src/dart/ast/ast.dart |
+++ b/pkg/analyzer/lib/src/dart/ast/ast.dart |
@@ -398,7 +398,7 @@ class ArgumentListImpl extends AstNodeImpl implements ArgumentList { |
@override |
void set correspondingPropagatedParameters( |
List<ParameterElement> parameters) { |
- if (parameters.length != _arguments.length) { |
+ if (parameters != null && parameters.length != _arguments.length) { |
throw new IllegalArgumentException( |
"Expected ${_arguments.length} parameters, not ${parameters.length}"); |
} |
@@ -410,7 +410,7 @@ class ArgumentListImpl extends AstNodeImpl implements ArgumentList { |
@override |
void set correspondingStaticParameters(List<ParameterElement> parameters) { |
- if (parameters.length != _arguments.length) { |
+ if (parameters != null && parameters.length != _arguments.length) { |
throw new IllegalArgumentException( |
"Expected ${_arguments.length} parameters, not ${parameters.length}"); |
} |