DEV Community

Molossus Spondee
Molossus Spondee

Posted on

Equality Constraints With Java

final class Subclasses<A extends B, A>{
}
record Equals<A, B>(Subclasses<? super A,B> left, Subclasses<? super B, A> right){}

Reifies equality constraints

Top comments (0)