Uno.CodeGen icon indicating copy to clipboard operation
Uno.CodeGen copied to clipboard

Derived version of a Key Equatable class should also be Key Equatable

Open carldebilly opened this issue 5 years ago • 0 comments

Bug report

Derived class for a IKeyEquatable class should be IKeyEquatable also using the same key (if none defined on derived class)

[GeneratedImmutable]
public partial class A
{
  [EqualityKey]
  public string Id { get; }

  public string Name { get; }
}

[GeneratedImmutable]
public partial class B : A
{
  public string Description { get; }
}

// A will be IKeyEquatable<A>
// B should also be IKeyEquatable<B> --AND-- IKeyEquatable<A>

Expected behavior

In previous example, B should be both IKeyEquatable<A> and IKeyEquatable<B>.

carldebilly avatar Oct 09 '19 20:10 carldebilly