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
Bundle interface fns leak past the §18.2 prelude gate, and a same-named user fn shares their flat signature (audit:all fails) #1362
with run prints false. u128_mul_would_overflow is a pub helper in the migrated bundle corpora (lib/std/re/defs.w, zl, tommyds, c_algorithms), reachable only through the prelude's use std.regex → std.re.*. It is not an enumerated prelude name (sema_prelude_gate_allows_name, Sema.w), so per §18.2 / D29 it must need an explicit import. Same for is_alnum, is_xdigit, to_lower, ... : print(f"{is_alnum(33)}") compiles with no use std.string.is_alnum, because the on-demand .wi merge (Frontend.w merge_interface_sections_on_demand) brings in std.re.defs's interface is_alnum, and decl_visible_from_current_gated does not apply the prelude gate to it (module_in_prelude_closure is false for the bundle module) — visibility passes through std.re.defs while the call binds std.string's flat signature.
Expected: a user program names bundle-corpus internals only through an explicit import (or not at all); closing the leak will break programs that call is_alnum/is_digit unimported today, so the behavior change needs a ruling on sequencing (fix-it use std.string.is_alnum exists already).
2. A user fn named like an interface fn: two signatures under one flat symbol
violation: declaration is_digit sig=222 param=0: finalized source type or LLVM parameter disagrees with FnAbi
The on-demand interface merge parses every bundle .wiis_digit the source mentions; SemaDecl's D39 interface_yields keeps the interface signature (i32) under the same flat symbol as the user's is_digit(u8), and the codegen audit (audit_declared_share_place_contracts, Codegen.w) checks that sig against the user's function. #1350's fix gives source fns a module-qualified identity when another module takes the short name (name$in$<module>, Frontend.w frontend_displace_fn_decl, link name unchanged via fn_abi_module_link_name); applying the same displacement to interface decls fixes (2) but also closes (1) for colliding names only, so it waits for the ruling on (1) rather than half-closing the gate.
Spec: §18.1 name precedence; §18.2 prelude; D29; D39.
Activity
Sema: engine corpora are never ambient, a facade import does not expo…
Sema: engine corpora are never ambient, a facade import does not expo…
Frontend/Sema: a fn another module's same-name declaration shadows ke…
Frontend/Sema: a fn another module shadows keeps its module-qualified…
Sema/Frontend: bundle internals need a `use` (§18.2); a bundle interf…
Sema: engine corpora are never ambient, a facade import does not expo…
Sema/Frontend: bundle internals need a `use` (§18.2); a bundle interf…
Sema: engine corpora are never ambient, a facade import does not expo…
CCodegen: frozen type resolution runs in the declaring module; a fail…
Sema/Frontend: bundle internals need a `use` (§18.2); a bundle interf…
Sema: engine corpora are never ambient, a facade import does not expo…
CCodegen: frozen type resolution runs in the declaring module; a fail…
Sema/Frontend: engine corpora never ambient (§18.2); bundle interface…
c_import/migrate/emit-c: no `-> Unit` on void C fns (#1838); header f…
D30 step 3 + D138: std imports the runtime interface; a .wo bundle is…