monkey0506 / native-generic-delegates

Generic C# delegates for P/Invoke.
Other
8 stars 0 forks source link

`ImplementationClass.Key` should discard `Location` in equality and hashing #43

Closed monkey0506 closed 1 month ago

monkey0506 commented 1 month ago

Describe the issue

When the MethodReference property was added to ImplementationClass.Key, the key was changed to use the method reference for hashing and equality. This produces incorrect results because the MethodReference type includes its Location in equality and hashing operations.

Proposed solution

The ImplementationClass.Key should be rewritten to consider the other properties of the MethodReference which are relevant, but discard the Location property.

Additional considerations

None.

monkey0506 commented 1 month ago

Fixed by 7298273.