Skip to content

Commit

Permalink
Fix for default parameters without name.
Browse files Browse the repository at this point in the history
R=brianwilkerson@google.com

Change-Id: I2084c6933a4c7b5f1ecf21e5ab3a15e30b718346
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100886
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
  • Loading branch information
scheglov committed Apr 30, 2019
1 parent 347b72c commit 0213a31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/analyzer/lib/src/dart/element/element.dart
Expand Up @@ -8547,7 +8547,7 @@ class ParameterElementImpl extends VariableElementImpl
return formalParameters.map((node) {
if (node is DefaultFormalParameter) {
NormalFormalParameter parameterNode = node.parameter;
var name = parameterNode.identifier.name;
var name = parameterNode.identifier?.name ?? '';
var reference = containerRef.getChild(name);
reference.node2 = node;
if (parameterNode is FieldFormalParameter) {
Expand Down

0 comments on commit 0213a31

Please sign in to comment.