Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1396)

Unified Diff: pkg/analyzer/lib/src/generated/parser.dart

Issue 2662433002: Fix some bugs related to the covariant keyword (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/parser_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/parser.dart
diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart
index c90af7d69f56ef2dadcf1fe42d92585ec695d120..2a0039222a19f6f3601a3f1da83961af52797af7 100644
--- a/pkg/analyzer/lib/src/generated/parser.dart
+++ b/pkg/analyzer/lib/src/generated/parser.dart
@@ -3848,7 +3848,7 @@ class Parser {
modifiers.constKeyword = getAndAdvance();
}
} else if (keyword == Keyword.COVARIANT) {
- if (modifiers.constKeyword != null) {
+ if (modifiers.covariantKeyword != null) {
_reportErrorForCurrentToken(
ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
_advance();
@@ -4152,6 +4152,11 @@ class Parser {
_tokenMatchesIdentifier(next)) {
covariantKeyword = getAndAdvance();
}
+ while (_matchesKeyword(Keyword.COVARIANT)) {
+ _reportErrorForCurrentToken(
+ ParserErrorCode.DUPLICATED_MODIFIER, [_currentToken.lexeme]);
+ _advance();
+ }
}
FinalConstVarOrType holder = parseFinalConstVarOrType(!inFunctionType,
inFunctionType: inFunctionType);
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/parser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698