E1122: role method implementation adds an effect
A role method declares the effects that any implementation may have, as an upper bound.
A role method declares the effects that any implementation may have, as an
upper bound. A perform block may declare fewer effects, so a pure
implementation can satisfy an effect-bearing role. It may not declare an
effect that the role does not list, because a call through the role would
hide that effect (ADR-0091). The error points at the method in the perform
block. The message lists the effects that the role allows and the ones that
the implementation declares, written as quoted names or as none.
Example
Fix
Declare the effect on the role method. Every implementation is then allowed to have it, and the callers of the role see it.
Run actus explain E1122 in your terminal to read this entry offline. Browse Modules & rules or all error codes.