-
-
Notifications
You must be signed in to change notification settings - Fork 40
[BUG] Index type ambiguity with InternalsVisibleTo and Microsoft.Bcl.Memory #513
Description
Describe the bug
When using a dependency that relies on Microsoft.Bcl.Memory or using Microsoft.Bcl.Memory directly, a type conflict occurs where both Polyfill and Microsoft.Bcl.Memory provide versions of Index and Polyfill forwards it's type to a package that has a dependency on Microsoft.Bcl.Memory.
I haven't tested this with the Range type but presumably this also occurs since Microsoft.Bcl.Memory also provides ```Range``.
If I may be so bold, I would suggest considering removing Index and Range from Polyfill in a future major version since it is provided by a Microsoft Bcl NuGet package for .NET Standard 2.0.
Minimal Repro
Attached a minimal repro:
Submit a PR that fixes the bug
I've created a PR that I believe fixes this (#512) by adding a PolyIndexAndRange feature toggle that is set to true by default, and removes the Index And Range types from compilation if set to false.