XO0701: effect performed outside the declared set
pub functions, interface methods, function types, and any function with a uses clause are checked against their declared effects; no clause means pure. Performing an effect outside that set, directly or through a call chain, a closure, an interface implementation, or a Go call (effect go), is an error, and the diagnostic shows the chain that performs it. Contract clauses (requires, ensures, invariant) must be pure. Declare the effect, or pass the work in from a caller that has it. See core 6.2.
Example
pub fn now(c: Clock) -> Time { c.now() }Fix
pub fn now(c: Clock) -> Time uses clock { c.now() }Run xo explain XO0701 for this text in a terminal, or see
section 10.6 of the specification.