Current behavior
Comparison is disallowed, because a supplier of Apples is not a subtype of a supplier of Fruit (or vice versa).
Proposed behavior
Comparison is allowed, because Apples are a subtype of Fruit.
Reason
The equality of two suppliers is not well defined. They might be equal, even when their static types are not.
Related issues
This is the same as #199 and #200, but now for suppliers
Allow comparing two suppliers
supplier<T>
andsupplier<U>
ifT
is a subtype ofU
or vice versa.Example PIE Code:
Current behavior Comparison is disallowed, because a supplier of Apples is not a subtype of a supplier of Fruit (or vice versa). Proposed behavior Comparison is allowed, because Apples are a subtype of Fruit.
Reason The equality of two suppliers is not well defined. They might be equal, even when their static types are not.
Related issues This is the same as #199 and #200, but now for suppliers