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
571 B
Plaintext
16 lines
571 B
Plaintext
// One C symbol bound twice with DIFFERENT sx signatures is diagnosed
|
|
// (issue 0128): the first registration used to silently win, mis-typing
|
|
// every call through the second declaration. Equal signatures share one
|
|
// registration silently (see std's read/write bound by several modules).
|
|
#import "modules/std.sx";
|
|
|
|
libc :: #library "c";
|
|
// std/process.sx already binds getenv as `-> *u8`; this view disagrees.
|
|
getenv_opt :: (name: [:0]u8) -> ?[:0]u8 extern libc "getenv";
|
|
|
|
main :: () -> i32 {
|
|
p := getenv_opt("PATH");
|
|
if p == null { return 1; }
|
|
return 0;
|
|
}
|