Xo is experimental. The source code is not public yet; it will be soon. Read the release notes
Menu · XO0407

Docs

XO0407: name used as the wrong kind of thing

error · reported by the checker

A name resolved, but to the wrong kind of entity: a type used as a value, a module or constant called like a function, a value given type arguments, a non interface used as a constraint, a method declared on an interface, or a type alias or constant that refers to itself. A common case is t.await(): await is written without parentheses. See core 2.4, 2.7, and 7.1.

Example

fn f() -> Int {
  scope s {
    let t = s.spawn(fn() { 1 })
    t.await()
  }
}

Fix

fn f() -> Int {
  scope s {
    let t = s.spawn(fn() { 1 })
    t.await
  }
}

Run xo explain XO0407 for this text in a terminal, or see section 10.6 of the specification.