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

Unified Diff: pkg/front_end/lib/src/fasta/parser/identifier_context.dart

Issue 2769063003: Allow literal symbols as constant expressions. (Closed)
Patch Set: Created 3 years, 9 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 | tests/co19/co19-kernel.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/parser/identifier_context.dart
diff --git a/pkg/front_end/lib/src/fasta/parser/identifier_context.dart b/pkg/front_end/lib/src/fasta/parser/identifier_context.dart
index 1f3dad56250c7a77aab4d57068306c181ef60fcf..29152efd84dcf56bf1278b91ce866b4f81fc2639 100644
--- a/pkg/front_end/lib/src/fasta/parser/identifier_context.dart
+++ b/pkg/front_end/lib/src/fasta/parser/identifier_context.dart
@@ -291,7 +291,8 @@ class IdentifierContext {
// Generally, declarations are legal in constant expressions. A
// continuation doesn't affect constant expressions: if what it's
// continuing is a problem, it has already been reported.
- allowedInConstantExpression ?? (inDeclaration || isContinuation);
+ allowedInConstantExpression ??
+ (inDeclaration || isContinuation || inSymbol);
String toString() => _name;
}
« no previous file with comments | « no previous file | tests/co19/co19-kernel.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698