| Index: pkg/front_end/lib/src/fasta/source/outline_builder.dart
|
| diff --git a/pkg/front_end/lib/src/fasta/source/outline_builder.dart b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
|
| index 2f9304c0b798e1312876328322e154cd43b8bf54..215d2eb04fc582f20332322e26b1b2ac5526bb38 100644
|
| --- a/pkg/front_end/lib/src/fasta/source/outline_builder.dart
|
| +++ b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
|
| @@ -425,7 +425,11 @@ class OutlineBuilder extends UnhandledListener {
|
| FormalParameterType kind = optional("{", beginToken)
|
| ? FormalParameterType.NAMED
|
| : FormalParameterType.POSITIONAL;
|
| - List parameters = popList(count);
|
| + // When recovering from an empty list of optional arguments, count may be
|
| + // 0. It might be simpler if the parser didn't call this method in that
|
| + // case, however, then [beginOptionalFormalParameters] wouldn't always be
|
| + // matched by this method.
|
| + List parameters = popList(count) ?? [];
|
| for (FormalParameterBuilder parameter in parameters) {
|
| parameter.kind = kind;
|
| }
|
|
|