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

Unified Diff: pkg/analysis_server/lib/src/services/completion/local_declaration_visitor.dart

Issue 965753003: fix invocation completion with trailing stmt (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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/analysis_server/lib/src/services/completion/local_declaration_visitor.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/local_declaration_visitor.dart b/pkg/analysis_server/lib/src/services/completion/local_declaration_visitor.dart
index 7bfeaabdab970c287236c8618fa604ffb7e2f3e6..82b45735f5843f0f306ccef88ebc347603145d96 100644
--- a/pkg/analysis_server/lib/src/services/completion/local_declaration_visitor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/local_declaration_visitor.dart
@@ -47,16 +47,16 @@ abstract class LocalDeclarationVisitor extends GeneralizingAstVisitor<bool> {
@override
bool visitBlock(Block node) {
- node.statements.forEach((Statement stmt) {
+ for (Statement stmt in node.statements) {
if (stmt.offset < offset) {
if (stmt is VariableDeclarationStatement) {
VariableDeclarationList varList = stmt.variables;
if (varList != null) {
- varList.variables.forEach((VariableDeclaration varDecl) {
+ for (VariableDeclaration varDecl in varList.variables) {
if (varDecl.end < offset) {
declaredLocalVar(varDecl.name, varList.type);
}
- });
+ };
}
} else if (stmt is FunctionDeclarationStatement) {
FunctionDeclaration declaration = stmt.functionDeclaration;
@@ -71,7 +71,7 @@ abstract class LocalDeclarationVisitor extends GeneralizingAstVisitor<bool> {
}
}
}
- });
+ };
return visitNode(node);
}

Powered by Google App Engine
This is Rietveld 408576698