Skip to main content
v0.14.0

Aspect implementations may not safely widen a method's generic constraints

Gap​

An implementation method's generic-constraint conjunction must be structurally equal to the aspect method's, after normalization. This is the RFC-0129 minimal interim rule, and it rejects some implementations that would be sound: one that drops a generic bound (a constraint widening), and one that drops the record kind. Both are rejected with T0012.

Impact​

An implementation cannot be more permissive than its aspect's method signature even where that is safe. The workaround is to restate the aspect's constraints exactly.

Affects​

Resolution​

Planned for v0.21.1: RFC-0149 (aspect method constraint domain inclusion, letting an implementation weaken a constraint) is under review, tracked as metel-core#895. The two negative fixtures pin the current behaviour and flip to positive fixtures when it lands.