From 954104a25eff10eed1d6ea8b371043dacd577a3d Mon Sep 17 00:00:00 2001 From: Timothy Makkison Date: Mon, 10 Jul 2023 22:17:31 +0100 Subject: [PATCH] chore: use `SpecialType.System_Int32` --- .../Descriptors/Enumerables/CollectionInfoBuilder.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Riok.Mapperly/Descriptors/Enumerables/CollectionInfoBuilder.cs b/src/Riok.Mapperly/Descriptors/Enumerables/CollectionInfoBuilder.cs index ddd8c695b4..14b2dcffcf 100644 --- a/src/Riok.Mapperly/Descriptors/Enumerables/CollectionInfoBuilder.cs +++ b/src/Riok.Mapperly/Descriptors/Enumerables/CollectionInfoBuilder.cs @@ -176,13 +176,10 @@ or CollectionType.ReadOnlyMemory if (typeInfo is not CollectionType.None) return "Count"; - var intType = types.Get(); var member = symbolAccessor .GetAllAccessibleMappableMembers(t) .FirstOrDefault( - x => - x.Name is nameof(ICollection.Count) or nameof(Array.Length) - && SymbolEqualityComparer.IncludeNullability.Equals(intType, x.Type) + x => x.Type.SpecialType == SpecialType.System_Int32 && x.Name is nameof(ICollection.Count) or nameof(Array.Length) ); return member?.Name; }