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

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

Issue 929323002: fix code completion invocation on getter (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge 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
« 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/invocation_computer.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/invocation_computer.dart b/pkg/analysis_server/lib/src/services/completion/invocation_computer.dart
index 0dc731937dd456761142f0f7a55c95ca5505c090..f6e68d5e2007a9c96ceff03b07825df6eef573d2 100644
--- a/pkg/analysis_server/lib/src/services/completion/invocation_computer.dart
+++ b/pkg/analysis_server/lib/src/services/completion/invocation_computer.dart
@@ -149,15 +149,15 @@ class _PrefixedIdentifierSuggestionBuilder extends
if (node is PrefixedIdentifier) {
SimpleIdentifier prefix = node.prefix;
if (prefix != null) {
- if (prefix.propagatedType != null) {
+ Element element = prefix.bestElement;
+ DartType type = prefix.bestType;
+ if (element is! ClassElement && type != null && !type.isDynamic) {
InterfaceTypeSuggestionBuilder.suggestionsFor(
request,
- prefix.propagatedType);
- } else {
- Element element = prefix.bestElement;
- if (element != null) {
- return element.accept(this);
- }
+ type);
+ return new Future.value(true);
+ } else if (element != null) {
+ return element.accept(this);
}
}
}
« 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