| Index: pkg/analyzer/tool/summary/dump_inferred_types.dart
|
| diff --git a/pkg/analyzer/tool/summary/dump_inferred_types.dart b/pkg/analyzer/tool/summary/dump_inferred_types.dart
|
| index 4c086e0c89813dfd83d1a87085e9429564ec2f76..bb7073416bdfd9a13f67798952aa0385e93f4bb0 100644
|
| --- a/pkg/analyzer/tool/summary/dump_inferred_types.dart
|
| +++ b/pkg/analyzer/tool/summary/dump_inferred_types.dart
|
| @@ -178,8 +178,12 @@ class InferredTypeCollector {
|
| typeParamsInScope.length - entityRef.paramReference];
|
| }
|
| String result = formatReference(entityRef.reference, typeOf: true);
|
| - if (entityRef.typeArguments.isNotEmpty) {
|
| - result += '<${entityRef.typeArguments.map(formatType).join(', ')}>';
|
| + List<EntityRef> typeArguments = entityRef.typeArguments.toList();
|
| + while (typeArguments.isNotEmpty && isDynamic(typeArguments.last)) {
|
| + typeArguments.removeLast();
|
| + }
|
| + if (typeArguments.isNotEmpty) {
|
| + result += '<${typeArguments.map(formatType).join(', ')}>';
|
| }
|
| if (implicitFunctionTypeIndices.isNotEmpty) {
|
| result =
|
| @@ -189,6 +193,17 @@ class InferredTypeCollector {
|
| }
|
|
|
| /**
|
| + * Determine if the given [entityRef] represents the pseudo-type `dynamic`.
|
| + */
|
| + bool isDynamic(EntityRef entityRef) {
|
| + if (entityRef.syntheticReturnType != null ||
|
| + entityRef.paramReference != 0) {
|
| + return false;
|
| + }
|
| + return formatReference(entityRef.reference, typeOf: true) == 'dynamic';
|
| + }
|
| +
|
| + /**
|
| * Collect all the inferred types contained in [obj], which is reachable via
|
| * [path]. [properties] is the result of calling `obj.toMap()`, and may be
|
| * modified before returning.
|
|
|