bynk.suite.fn_method
Error A suite helper fn is a method (fn Type.name); suite helpers are free functions.
A suite helper is a plain function its cases call by name, so it is a free fn, not a method (fn Type.name). A method belongs to its type: declare it in the target or in a commons. In a suite, take the value as an ordinary parameter.
Example
type Count = Int where NonNegative
// tests/desk.test.bynkfn Count.bump(self) -> Int { 1 } // ✗ a methodfn bump(count: Count) -> Int { 1 } // ✓ a free functionIn the Book
See also
- The grammar rule it governs:
fn_decl. - Every code in its category, Suites and cases, on the diagnostic index.
bynk explain bynk.suite.fn_methodshows the same from the installed toolchain, without a network.