Index: pkg/front_end/lib/src/fasta/parser/parser.dart |
diff --git a/pkg/front_end/lib/src/fasta/parser/parser.dart b/pkg/front_end/lib/src/fasta/parser/parser.dart |
index 65f41aed1056906e6b6fc50ace4721f84942a2de..2a58ae6dbfcc3a8c525a84b269a5f7552ef7dc96 100644 |
--- a/pkg/front_end/lib/src/fasta/parser/parser.dart |
+++ b/pkg/front_end/lib/src/fasta/parser/parser.dart |
@@ -499,8 +499,10 @@ class Parser { |
// modifier. |
// This enables the case where `covariant` is the name of the parameter: |
// void foo(covariant); |
+ Token covariantKeyword; |
if (identical(token.stringValue, 'covariant') && |
(token.next.isIdentifier() || isModifier(token.next))) { |
+ covariantKeyword = token; |
token = token.next; |
} |
token = parseModifiers(token); |
@@ -574,7 +576,7 @@ class Parser { |
} else { |
listener.handleFormalParameterWithoutValue(token); |
} |
- listener.endFormalParameter(thisKeyword, kind); |
+ listener.endFormalParameter(covariantKeyword, thisKeyword, kind); |
return token; |
} |