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

Unified Diff: pkg/analyzer/lib/src/summary/link.dart

Issue 1978483003: Fix AST-based type inference of top level function tearoffs (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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/analyzer/test/src/task/strong/inferred_type_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/link.dart
diff --git a/pkg/analyzer/lib/src/summary/link.dart b/pkg/analyzer/lib/src/summary/link.dart
index bc2fc0def4aac9a61b6d6dc3af59ca5e3b26bb05..76569ac2636294235a595635f34a4641194dec02 100644
--- a/pkg/analyzer/lib/src/summary/link.dart
+++ b/pkg/analyzer/lib/src/summary/link.dart
@@ -1156,6 +1156,9 @@ class CompilationUnitElementInBuildUnit extends CompilationUnitElementForLink {
numTypeParameters: element.typeParameters.length,
containingReference:
enclosingClass != null ? addReference(enclosingClass) : null,
+ dependency: enclosingClass != null
+ ? null
+ : library.addDependency(element.library),
kind: kind);
} else if (element is FunctionElementForLink_Local) {
FunctionElementImpl parent = element.enclosingElement;
@@ -1171,6 +1174,7 @@ class CompilationUnitElementInBuildUnit extends CompilationUnitElementForLink {
kind: ReferenceKind.function);
} else if (element is TopLevelVariableElementForLink) {
return addRawReference(element.name,
+ dependency: library.addDependency(element.library),
kind: ReferenceKind.topLevelPropertyAccessor);
} else if (element is FieldElementForLink_ClassField) {
ClassElementForLink_Class enclosingClass = element.enclosingElement;
« no previous file with comments | « no previous file | pkg/analyzer/test/src/task/strong/inferred_type_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698