[EqualityHash] on objects try to convert them to string in instead of getting hash
DevenColletteNV opened this issue · comments
DevenColletteNV commented
error CS1503: Argument 1: cannot convert from 'MyProject.AuthenticationData' to 'string'
[Bindable]
[GeneratedImmutable]
public partial class ApplicationSettings
{
[EqualityHash]
public AuthenticationData AuthenticationData { get; }
...}
[Bindable]
[GeneratedImmutable]
public partial class AuthenticationData
{
public AuthenticationData(string accessToken)
{
AccessToken = accessToken;
}
[SerializationProperty("access_token")]
[EqualityKey]
public string AccessToken { get; }
}
}
Carl de Billy commented
The bug was caused by a wrong condition. It should have tested for "string" but it was "reference type" instead. The PR should fix this.