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

Unified Diff: pkg/analyzer/lib/src/task/strong/checker.dart

Issue 2842573002: Allow 'extract index' in top-level inference. (Closed)
Patch Set: Created 3 years, 8 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
Index: pkg/analyzer/lib/src/task/strong/checker.dart
diff --git a/pkg/analyzer/lib/src/task/strong/checker.dart b/pkg/analyzer/lib/src/task/strong/checker.dart
index 6f9d81c8142b2e57e67c5c36be1d519ea15f6d29..ee666f2b755ff926d05c8c34671c603951936928 100644
--- a/pkg/analyzer/lib/src/task/strong/checker.dart
+++ b/pkg/analyzer/lib/src/task/strong/checker.dart
@@ -1114,7 +1114,8 @@ class CodeChecker extends RecursiveAstVisitor {
n is DoubleLiteral ||
n is IntegerLiteral ||
n is StringLiteral ||
- n is SymbolLiteral) {
+ n is SymbolLiteral ||
+ n is IndexExpression) {
// Nothing to validate.
} else if (n is AwaitExpression) {
_validateTopLevelInitializer(name, n.expression);
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/driver.dart ('k') | pkg/analyzer/test/src/summary/top_level_inference_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698