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

Unified Diff: pkg/analyzer/lib/src/dart/analysis/index.dart

Issue 2537883002: Don't attempt to record reference to a named parameter of a synthetic function. (Closed)
Patch Set: Created 4 years, 1 month 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/analyzer/test/src/dart/analysis/index_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/analysis/index.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/index.dart b/pkg/analyzer/lib/src/dart/analysis/index.dart
index 6b5c09c5963ec124816cd2b82efbf8804e412e8b..8c8c132aefac169fdf9d03821f3c787c5e995dbe 100644
--- a/pkg/analyzer/lib/src/dart/analysis/index.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/index.dart
@@ -440,6 +440,13 @@ class _IndexContributor extends GeneralizingAstVisitor {
false) {
return;
}
+ // Ignore named parameters of synthetic functions, e.g. created for LUB.
+ // These functions are not bound to a source, we cannot index them.
+ if (elementKind == ElementKind.PARAMETER &&
+ element is ParameterElement &&
+ element.enclosingElement.isSynthetic) {
+ return;
+ }
// Add the relation.
assembler.addElementRelation(element, kind, offset, length, isQualified);
}
« no previous file with comments | « no previous file | pkg/analyzer/test/src/dart/analysis/index_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698