Clear the examples/issue-* namespace (new layout keeps open-issue repros under
issues/, co-located with their .md). Two legacy files:
- issue-0030 was a feature-request placeholder (trivial main, no real test).
`extern G : T;` cross-file sx globals are still unimplemented (parse error),
so it's an open feature request: issues/0030-extern-global-declarations.{md,sx}.
- issue-0019 was a broken/superseded multi-file fixture (relative imports, not
runnable from root; the non-transitive-#import scenario is covered by the
passing 0706-modules-import-non-transitive). Moved to
issues/0019-import-non-transitive-c-scope/ with a status note; safe to delete.
Suite unchanged: 324 passed.
15 lines
620 B
Plaintext
15 lines
620 B
Plaintext
// Repro for issue 0030 (OPEN feature request): cross-file sx `extern` globals.
|
|
// Want: `extern G : T;` declares a reference to a global defined in another sx
|
|
// file (resolved at link time), mirroring `#foreign` functions. Today this is a
|
|
// parse error — the form doesn't exist. Distinct from `name : T #foreign;`
|
|
// (an external C data symbol; see examples/1205-ffi-foreign-global.sx).
|
|
//
|
|
// Expected (once implemented): parses; `g_x` resolves to a global defined
|
|
// elsewhere. Actual: error "expected '::', ':=', or ':' after identifier".
|
|
|
|
#import "modules/std.sx";
|
|
|
|
extern g_x : *void;
|
|
|
|
main :: () -> s32 { 0; }
|