Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/rrousselGit/freezed
Browse files Browse the repository at this point in the history
  • Loading branch information
rrousselGit committed Oct 14, 2022
2 parents 8978343 + 8c33c56 commit 233519c
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions packages/freezed/lib/src/templates/properties.dart
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,20 @@ extension IsDartCollection on DartType {
bool get isPossiblyDartCollection {
final interface = safeCast<InterfaceType>();

return isDartCoreMap ||
isDartCoreIterable ||
isDartCoreSet ||
isDartCoreList ||
return _isDartCollectionType ||
isDynamic ||
isDartCoreObject ||
this is TypeParameterType ||
(interface != null &&
interface.allSupertypes.any((e) => e.isPossiblyDartCollection));
interface.allSupertypes.any((e) => e._isDartCollectionType));
}

/// Whether this type is a [List], [Map], [Set] or [Iterable].
bool get _isDartCollectionType {
return isDartCoreMap ||
isDartCoreIterable ||
isDartCoreSet ||
isDartCoreList;
}
}

Expand Down

0 comments on commit 233519c

Please sign in to comment.