| Index: pkg/analyzer/test/src/summary/summary_test.dart
|
| diff --git a/pkg/analyzer/test/src/summary/summary_test.dart b/pkg/analyzer/test/src/summary/summary_test.dart
|
| index b282648316b9189f2a29b5e64282aa27680ba313..6c09674ede97a502ac9ae34e898784f91db57d88 100644
|
| --- a/pkg/analyzer/test/src/summary/summary_test.dart
|
| +++ b/pkg/analyzer/test/src/summary/summary_test.dart
|
| @@ -2788,6 +2788,24 @@ void set f(value) {}''';
|
| expect(typeRef.typeArguments, isEmpty);
|
| }
|
|
|
| + test_type_arguments_explicit_dynamic_dynamic() {
|
| + UnlinkedTypeRef typeRef = serializeTypeText('Map<dynamic, dynamic>');
|
| + checkTypeRef(typeRef, 'dart:core', 'dart:core', 'Map',
|
| + allowTypeParameters: true, numTypeParameters: 2);
|
| + // Trailing type arguments of type `dynamic` are omitted.
|
| + expect(typeRef.typeArguments, isEmpty);
|
| + }
|
| +
|
| + test_type_arguments_explicit_dynamic_int() {
|
| + UnlinkedTypeRef typeRef = serializeTypeText('Map<dynamic, int>');
|
| + checkTypeRef(typeRef, 'dart:core', 'dart:core', 'Map',
|
| + allowTypeParameters: true, numTypeParameters: 2);
|
| + // Leading type arguments of type `dynamic` are not omitted.
|
| + expect(typeRef.typeArguments.length, 2);
|
| + checkDynamicTypeRef(typeRef.typeArguments[0]);
|
| + checkTypeRef(typeRef.typeArguments[1], 'dart:core', 'dart:core', 'int');
|
| + }
|
| +
|
| test_type_arguments_explicit_dynamic_typedef() {
|
| UnlinkedTypeRef typeRef =
|
| serializeTypeText('F<dynamic>', otherDeclarations: 'typedef T F<T>();');
|
| @@ -2798,6 +2816,24 @@ void set f(value) {}''';
|
| expect(typeRef.typeArguments, isEmpty);
|
| }
|
|
|
| + test_type_arguments_explicit_String_dynamic() {
|
| + UnlinkedTypeRef typeRef = serializeTypeText('Map<String, dynamic>');
|
| + checkTypeRef(typeRef, 'dart:core', 'dart:core', 'Map',
|
| + allowTypeParameters: true, numTypeParameters: 2);
|
| + // Trailing type arguments of type `dynamic` are omitted.
|
| + expect(typeRef.typeArguments.length, 1);
|
| + checkTypeRef(typeRef.typeArguments[0], 'dart:core', 'dart:core', 'String');
|
| + }
|
| +
|
| + test_type_arguments_explicit_String_int() {
|
| + UnlinkedTypeRef typeRef = serializeTypeText('Map<String, int>');
|
| + checkTypeRef(typeRef, 'dart:core', 'dart:core', 'Map',
|
| + allowTypeParameters: true, numTypeParameters: 2);
|
| + expect(typeRef.typeArguments.length, 2);
|
| + checkTypeRef(typeRef.typeArguments[0], 'dart:core', 'dart:core', 'String');
|
| + checkTypeRef(typeRef.typeArguments[1], 'dart:core', 'dart:core', 'int');
|
| + }
|
| +
|
| test_type_arguments_explicit_typedef() {
|
| UnlinkedTypeRef typeRef =
|
| serializeTypeText('F<int>', otherDeclarations: 'typedef T F<T>();');
|
|
|