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

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

Issue 1385213002: fix call to get current source - fixes #24509 (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/services/completion/local_reference_contributor.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/local_reference_contributor.dart b/pkg/analysis_server/lib/src/services/completion/local_reference_contributor.dart
index aa495cf0d7789245b05e368533b50d9dbe45ffc1..181f25959af3626ab9f51923283277af5e45d9be 100644
--- a/pkg/analysis_server/lib/src/services/completion/local_reference_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/local_reference_contributor.dart
@@ -356,7 +356,7 @@ class _LocalVisitor extends LocalDeclarationVisitor {
_LocalVisitor(this.request, int offset, this.optype) : super(offset) {
includeLocalInheritedTypes = !optype.inStaticMethodBody;
if (request.replacementLength > 0) {
- var contents = request.source.contents;
+ var contents = request.context.getContents(request.source);
if (contents != null &&
contents.data != null &&
contents.data.startsWith('_', request.replacementOffset)) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698