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.
16 lines
810 B
Plaintext
16 lines
810 B
Plaintext
// Type-author-aware bare-TYPE visibility gate (Phase E1, R1). `flatval.sx` is
|
|
// flat-imported and authors a VALUE/FUNCTION `Secret`; `nstype.sx` is namespaced
|
|
// (`nst :: #import`) and authors a TYPE `Secret`. A bare `Secret` in a type
|
|
// position must NOT resolve: the only flat-visible `Secret` author is a FUNCTION,
|
|
// and a same-name flat value does NOT make the namespaced-only TYPE bare-visible.
|
|
// The leak this closes: a name-only gate would see the flat function and let the
|
|
// global `findByName` first-match return the namespaced-only struct. The type is
|
|
// reachable only as `nst.Secret`.
|
|
#import "0745-modules-flat-value-shadows-ns-only-type/flatval.sx";
|
|
nst :: #import "0745-modules-flat-value-shadows-ns-only-type/nstype.sx";
|
|
|
|
main :: () -> i32 {
|
|
s : Secret = .{ x = 5, y = 6 };
|
|
s.x
|
|
}
|