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

Unified Diff: pkg/analyzer/lib/src/summary/link.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/link.dart
diff --git a/pkg/analyzer/lib/src/summary/link.dart b/pkg/analyzer/lib/src/summary/link.dart
index 52b3243b6128cd12272b4874c563f160dd5de340..4297af07e15405d7be78e62039be127053eb707d 100644
--- a/pkg/analyzer/lib/src/summary/link.dart
+++ b/pkg/analyzer/lib/src/summary/link.dart
@@ -221,8 +221,6 @@ EntityRefBuilder _createLinkedType(
/**
* Store the given [typeArguments] in [encodedType], using [compilationUnit] and
* [typeParameterContext] to serialize them.
- *
- * Trailing arguments of type `dynamic` are dropped.
*/
void _storeTypeArguments(
List<DartType> typeArguments,
@@ -230,20 +228,13 @@ void _storeTypeArguments(
CompilationUnitElementInBuildUnit compilationUnit,
TypeParameterizedElementForLink typeParameterContext) {
int count = typeArguments.length;
- while (count > 0) {
- if (typeArguments[count - 1].isDynamic) {
- count--;
- } else {
- List<EntityRefBuilder> encodedTypeArguments =
- new List<EntityRefBuilder>(count);
- for (int i = 0; i < count; i++) {
- encodedTypeArguments[i] = _createLinkedType(
- typeArguments[i], compilationUnit, typeParameterContext);
- }
- encodedType.typeArguments = encodedTypeArguments;
- break;
- }
+ List<EntityRefBuilder> encodedTypeArguments =
+ new List<EntityRefBuilder>(count);
+ for (int i = 0; i < count; i++) {
+ encodedTypeArguments[i] = _createLinkedType(
+ typeArguments[i], compilationUnit, typeParameterContext);
}
+ encodedType.typeArguments = encodedTypeArguments;
}
/**

Powered by Google App Engine
This is Rietveld 408576698