electricessence / TypeScript.NET

A JavaScript-Friendly .NET Based TypeScript Library (Moved)
https://github.com/electricessence/TypeScript.NET-Core
Other
251 stars 36 forks source link

List<>.contains does not work if custom comparer #70

Closed mavogt closed 6 years ago

mavogt commented 6 years ago

Hi I think I found a small bug: I have a generic list with a custom comparer: grafik The function "contains" does not work correctly because it does not respect the custom comparer. I think I found the error in your code in the System.Collections.Array.Utility class in the method indexOf(): grafik The marked if is evaluated to true and so it does just a normal "array.indexOf(item)".

Thanks a lot for that great library! Best regards Martin Vogt

electricessence commented 6 years ago

@mavogt Will investigate today.

electricessence commented 6 years ago

This is a good catch. Working on a fix now.

electricessence commented 6 years ago

version 4.11.1 published to NPM. Compiled with TS 2.9.2