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

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

Issue 1954203002: Keep all type arguments in summaries - dynamic or not. (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
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 3bebefa4e23ad0cdcbbfa534c420c5d4c30d7e11..1d42e0c195a344dfd05f4733956f5429c3b71573 100644
--- a/pkg/analyzer/lib/src/summary/summarize_elements.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_elements.dart
@@ -617,9 +617,7 @@ class _CompilationUnitSerializer {
}
}
for (PropertyAccessorElement accessor in cls.accessors) {
- if (accessor.isStatic &&
- accessor.isGetter &&
- accessor.isPublic) {
+ if (accessor.isStatic && accessor.isGetter && accessor.isPublic) {
// TODO(paulberry): should numTypeParameters include class params?
bs.add(new UnlinkedPublicNameBuilder(
name: accessor.name, kind: ReferenceKind.propertyAccessor));
@@ -1074,20 +1072,9 @@ class _CompilationUnitSerializer {
}
List<DartType> typeArguments = getTypeArguments(type);
if (typeArguments != null) {
- // Trailing type arguments of type 'dynamic' should be omitted.
- int numArgsToSerialize = typeArguments.length;
- while (numArgsToSerialize > 0 &&
- typeArguments[numArgsToSerialize - 1].isDynamic) {
- --numArgsToSerialize;
- }
- if (numArgsToSerialize > 0) {
- List<EntityRefBuilder> serializedArguments = <EntityRefBuilder>[];
- for (int i = 0; i < numArgsToSerialize; i++) {
- serializedArguments
- .add(serializeTypeRef(typeArguments[i], context));
- }
- b.typeArguments = serializedArguments;
- }
+ b.typeArguments = typeArguments
+ .map((typeArgument) => serializeTypeRef(typeArgument, context))
+ .toList();
}
}
return b;

Powered by Google App Engine
This is Rietveld 408576698