Skip to content
ZOLO / TE135 Type · error

unknown name has no native binding

A native/LLVM-only check: a bare identifier resolved to nothing at all. Without a Lua prelude to fall back on, it would silently lower to `nil` at runtime — the "typo turns into a quiet no-op" class this catches at build time.

Why this fires

This is a native/LLVM build-only check — it never fires on zolo run (the VM). A lowercase-initial bare identifier resolved to nothing: not a local/parameter/capture, not a top-level global or function, not an enum/struct/variant, not a codegen-resolved builtin, and not a VM-prelude declaration. On the native and LLVM backends there is no Lua prelude to fall back on, so an unresolved name would otherwise silently lower to nil at runtime — the exact "typo turns into a quiet no-op" class this check exists to catch at build time instead.

print(totally_unknown_fn)

Building this natively fails with:

error[TE135]: unknown name `totally_unknown_fn` — it resolves to nothing on the
native/LLVM backend (which has no Lua prelude), so it would silently evaluate to
nil at runtime. Check for a typo, define it, or bring it into scope with `use`.
(The VM's `zolo run` tolerates an undefined global as nil; the AOT backends
refuse to emit the silent nil.)

The same program runs fine on the VM (zolo run), printing nil — TE135 exists precisely because that silent behavior is not acceptable once you build for native/LLVM.

Fix it

1. Fix the typo / define the name

fn totally_unknown_fn() -> str { return "hi" }
print(totally_unknown_fn())

2. Bring it into scope with use

If the name is meant to come from a module or plugin, import it explicitly:

use std::math
print(math.pi)

A use m::* glob import, or any use m::{name} import, suppresses this check for the names it could plausibly install at runtime — the compiler can't tell "genuinely missing" from "installed by the glob" in that case, so it stays permissive.

See also

  • TE134 — a name that DOES exist (in the VM prelude) but has no native bridge yet.
  • TE100 — the VM/typeck-side "undefined variable" check.

Global index

Find your way through Zolo

Try an idea

Start here

9 results

9 results

enespt-br