Index: lib/src/utils.dart |
diff --git a/lib/src/utils.dart b/lib/src/utils.dart |
index ba0e0354a79b51e80256207403339ef1a8362e05..4c7339520c673f724b77c967c1d74164a4615bbe 100644 |
--- a/lib/src/utils.dart |
+++ b/lib/src/utils.dart |
@@ -375,9 +375,12 @@ Object getConstantField( |
return (f == null || f.type != expectedType) ? null : f.value; |
} |
-ParameterizedType fillDynamicTypeArgs(ParameterizedType t, TypeProvider types) { |
- var dyn = new List.filled(t.typeArguments.length, types.dynamicType); |
- return t.substitute2(dyn, t.typeArguments); |
+DartType fillDynamicTypeArgs(DartType t, TypeProvider types) { |
+ if (t is ParameterizedType) { |
+ var dyn = new List.filled(t.typeArguments.length, types.dynamicType); |
+ return t.substitute2(dyn, t.typeArguments); |
+ } |
+ return t; |
} |
/// Similar to [SimpleIdentifier] inGetterContext, inSetterContext, and |