You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Imported files answer to their file name as well as to their alias, so one prefix can point at two files #1184
BEND_NO_TELEMETRY=1 bend main.bend --verdict on the two-file layout below, then on the four-file layout.
What happened
Two files. main.bend imports ./X.bend under the alias Z, and never declares an alias X. Still, X.f resolves:
$ bend main.bend --verdict
ALL PROOFS CHECK
Renaming X.bend to real.bend (keeping as Z) gives the expected expected : a defined name / observed : X.f. So the file name is acting as a namespace prefix, independently of the alias.
Four files. main.bend aliases ./q.bend as X. Another import (y.bend) loads ./X.bend under as Z. In main.bend, X.M names q.bend's def and X.f names X.bend's def at the same time: the file-name namespace and the user alias merge. A reader of main.bend sees import ./q.bend as X and a claim about X.f, and assumes the wrong file.
The guide says "The alias is local to the importing file" (guide/GUIDE.md, imports section), which this contradicts. The emitted BendTT carries the real X.f with its real body, so the kernel checks the right thing; this is a name-resolution issue, not a soundness one.
Same result on 2.0.32 and on main at 777ee0b (2.0.34), run as bun bend2/main.ts.
Activity
olety commentedon Sep 29, 2026
Diagram