Something that isn't a function or closure was called with (...). In Auk only functions and
closures (types like (int) => int) can be called.
Wrong#
fn main() {
let n = 5
print(n(2))
}Fixed#
fn main() {
let n = 5
print(n * 2)
}Common causes#
- Implicit multiplication from math notation:
n(2)instead ofn * 2. - A variable that shadows a function of the same name.
- Calling a field that holds data, not a closure.