bynk.resolve.unknown_function
Error Called a function that does not exist.
A call names a function that is not in scope. Only functions declared in the same unit, or brought in through uses, can be called; a capitalised name, which would construct an agent, needs an agent of that name in scope. This is most often a typo or a missing uses. A lambda cannot call itself through its own let name either, because the name is not bound until the lambda is built. A type used as a function, as in Money(5), is the separate bynk.resolve.type_as_function.
Example
fn double(x: Int) -> Int { x * 2}
dubble(4) // ✗ no function `dubble`
double(4) // ✓ the declared nameIn the Book
See also
- The grammar rule it governs:
call. - Every code in its category, Resolution, on the diagnostic index.
bynk explain bynk.resolve.unknown_functionshows the same from the installed toolchain, without a network.