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

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

Issue 1365403002: Do not suggest static fields in constructor initializer - fixes #24256 (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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/analysis_server/test/services/completion/completion_test_util.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/services/completion/prefixed_element_contributor.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/prefixed_element_contributor.dart b/pkg/analysis_server/lib/src/services/completion/prefixed_element_contributor.dart
index 1df4993044afe9f542d9d7a665eef073484c12ed..5a52da8f134d8c03e108567d3e21e9f410d3908f 100644
--- a/pkg/analysis_server/lib/src/services/completion/prefixed_element_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/prefixed_element_contributor.dart
@@ -127,7 +127,7 @@ class _FieldFormalSuggestionBuilder implements SuggestionBuilder {
ClassDeclaration classDecl =
constructorDecl.getAncestor((p) => p is ClassDeclaration);
for (ClassMember member in classDecl.members) {
- if (member is FieldDeclaration) {
+ if (member is FieldDeclaration && !member.isStatic) {
for (VariableDeclaration varDecl in member.fields.variables) {
SimpleIdentifier fieldId = varDecl.name;
if (fieldId != null) {
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/completion/completion_test_util.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698