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

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

Issue 1558353003: Add a count of type parameters to UnlinkedPublicName. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
Index: pkg/analyzer/lib/src/summary/summarize_elements.dart
diff --git a/pkg/analyzer/lib/src/summary/summarize_elements.dart b/pkg/analyzer/lib/src/summary/summarize_elements.dart
index e28319a9aae8e89721eb70ef55394c881bdaed23..35b28eb0973c533882a823ab7ebddda304c81d18 100644
--- a/pkg/analyzer/lib/src/summary/summarize_elements.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_elements.dart
@@ -167,13 +167,17 @@ class _LibrarySerializer {
for (PropertyAccessorElement accessor in element.accessors) {
if (accessor.isPublic) {
names.add(encodeUnlinkedPublicName(ctx,
- kind: PrelinkedReferenceKind.other, name: accessor.name));
+ kind: PrelinkedReferenceKind.other,
+ name: accessor.name,
+ numTypeParameters: accessor.typeParameters.length));
}
}
for (ClassElement cls in element.types) {
if (cls.isPublic) {
names.add(encodeUnlinkedPublicName(ctx,
- kind: PrelinkedReferenceKind.classOrEnum, name: cls.name));
+ kind: PrelinkedReferenceKind.classOrEnum,
+ name: cls.name,
+ numTypeParameters: cls.typeParameters.length));
}
}
for (ClassElement enm in element.enums) {
@@ -185,13 +189,17 @@ class _LibrarySerializer {
for (FunctionElement function in element.functions) {
if (function.isPublic) {
names.add(encodeUnlinkedPublicName(ctx,
- kind: PrelinkedReferenceKind.other, name: function.name));
+ kind: PrelinkedReferenceKind.other,
+ name: function.name,
+ numTypeParameters: function.typeParameters.length));
}
}
for (FunctionTypeAliasElement typedef in element.functionTypeAliases) {
if (typedef.isPublic) {
names.add(encodeUnlinkedPublicName(ctx,
- kind: PrelinkedReferenceKind.typedef, name: typedef.name));
+ kind: PrelinkedReferenceKind.typedef,
+ name: typedef.name,
+ numTypeParameters: typedef.typeParameters.length));
}
}
if (unitNum == 0) {
« no previous file with comments | « pkg/analyzer/lib/src/summary/public_namespace_computer.dart ('k') | pkg/analyzer/test/src/summary/summary_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698