| Index: pkg/analyzer/lib/src/summary/summarize_const_expr.dart
|
| diff --git a/pkg/analyzer/lib/src/summary/summarize_const_expr.dart b/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
|
| index e3a901766c474914854289f739c737cd7ff330aa..5a8702a99f7bad5baff07d16c9872b82015351e2 100644
|
| --- a/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
|
| +++ b/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
|
| @@ -178,12 +178,8 @@ abstract class AbstractConstExprSerializer {
|
| /**
|
| * Return [EntityRefBuilder] that corresponds to the given [type].
|
| */
|
| - EntityRefBuilder serializeTypeName(TypeAnnotation type) {
|
| - if (type is TypeName) {
|
| - return serializeType(type?.type, type?.name, type?.typeArguments);
|
| - }
|
| - throw new ArgumentError(
|
| - 'Cannot serialize an instance of ${type.runtimeType}');
|
| + EntityRefBuilder serializeTypeName(TypeName type) {
|
| + return serializeType(type?.type, type?.name, type?.typeArguments);
|
| }
|
|
|
| /**
|
| @@ -653,8 +649,8 @@ abstract class AbstractConstExprSerializer {
|
| ints.add(0);
|
| } else {
|
| ints.add(typeArguments.arguments.length);
|
| - for (TypeAnnotation type in typeArguments.arguments) {
|
| - references.add(serializeTypeName(type));
|
| + for (TypeName typeName in typeArguments.arguments) {
|
| + references.add(serializeTypeName(typeName));
|
| }
|
| }
|
| }
|
|
|