# XO0407: name used as the wrong kind of thing

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

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

## Fix

```xo
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](../../spec/core/#106-diagnostic-codes).

