Files
sx/examples/modules/0742-modules-namespaced-only-bare-const-not-visible.sx
agra 66bdc70bf1 test: group examples into per-category folders
Move examples/*.sx and their expected/ snapshots into per-category
subfolders (examples/<category>/...). Folder = leading filename token,
with ffi-objc/ffi-jni kept whole; filenames are unchanged. The corpus
runner and LSP sweep now discover each category's expected/ dir, while
issues/ stays flat. Example 1058's repo-root-relative companion import
is made file-relative. Path strings embedded in 164 snapshots were
regenerated (path-only changes). Test-layout docs in CLAUDE.md updated.
2026-06-21 14:41:34 +03:00

16 lines
814 B
Plaintext

// Bare module-const visibility under a NAMESPACED-only import — the const
// sibling of 0736 (folded req #1 of the source-aware resolver, Phase E1).
// `dep.sx` is imported only as `dep :: #import`, so its top-level `DEP_LEN`
// is reachable ONLY as `dep.DEP_LEN`. A BARE `DEP_LEN` in a comptime
// array-dimension position must NOT resolve: bare module-const visibility
// joins over the FLAT import edges (`flat_import_graph`), and a namespaced
// alias is not a flat edge. Before the fix the bare const leaked through the
// global `module_const_map` first-match (and its float-fold fallback) straight
// into the `[VAL]i32` dimension, so the array silently got length 3.
dep :: #import "0742-modules-namespaced-only-bare-const-not-visible/dep.sx";
main :: () -> i32 {
arr : [DEP_LEN]i32 = ---;
0
}