Skip to content

Commit

Permalink
chore: use SpecialType.System_Int32
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyMakkison committed Jul 11, 2023
1 parent 8ca1d91 commit 954104a
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,10 @@ or CollectionType.ReadOnlyMemory
if (typeInfo is not CollectionType.None)
return "Count";

var intType = types.Get<int>();
var member = symbolAccessor
.GetAllAccessibleMappableMembers(t)
.FirstOrDefault(
x =>
x.Name is nameof(ICollection<object>.Count) or nameof(Array.Length)
&& SymbolEqualityComparer.IncludeNullability.Equals(intType, x.Type)
x => x.Type.SpecialType == SpecialType.System_Int32 && x.Name is nameof(ICollection<object>.Count) or nameof(Array.Length)
);
return member?.Name;
}
Expand Down

0 comments on commit 954104a

Please sign in to comment.