Files
sx/examples/1176-diagnostics-foreign-removed.sx
agra 8180faf839 test(ffi-linkage): Phase 8.0 — xfail #foreign-removed rejection diagnostic
Add examples/1176-diagnostics-foreign-removed.sx pinning the DESIRED Phase 8 cutover
behavior: a bare '#foreign' decl must be rejected with a clear migration message
('#foreign has been removed; use the postfix extern/export'). RED — '#foreign' still
parses (routes onto extern) so the decl compiles and exits 0 instead of erroring.
The very next commit (8.1, parser hard-reject) greens it.
2026-06-15 07:40:12 +03:00

11 lines
436 B
Plaintext

// Phase 8 (FFI-linkage) cutover: the prefix `#foreign` linkage directive has
// been removed. A declaration imports an external C symbol via the postfix
// `extern` keyword (or defines + exposes one via `export`). The parser rejects
// `#foreign` with a clear migration message instead of routing it onto `extern`.
//
// Expected: one error on the `#foreign` token; exit 1.
abs_c :: (n: i32) -> i32 #foreign;
main :: () -> i32 { 0 }