Why this fires¶
TE138 protects the native and LLVM decl-module linker from producing a
program whose names resolve differently from the VM. It fires in either of
these cases:
- a user declaration starts with the reserved
__zolo_std_prefix used for linked standard-library function bodies; or - a reachable function in a declaration module refers to a sibling item that the native linker cannot carry into the final program.
Without this check, the AOT build could succeed and then read nil, call the
wrong declaration, or omit a required implementation while the VM continued
to work.
Fix it¶
For a reserved-prefix collision, rename the user declaration so it does not
start with __zolo_std_. That namespace belongs to the compiler.
For an unsupported sibling reference, read the diagnostic message for the module and item names. Move the required value into the reachable function, pass it as an argument, or use a declaration form supported by the linker. Do not hide the reference behind a second helper: the linker rejects it to preserve backend parity, not because name discovery was incomplete.
Why this is an AOT error¶
Declaration modules are interpreted directly by the VM, but native and LLVM
builds splice their reachable Zolo bodies into the program. TE138 stops when
that splice cannot preserve the module's meaning instead of shipping a binary
with a silent VM/AOT divergence.