src/: ~21 capital-Foreign comments the case-sensitive verify grep missed (Foreign-class→Runtime-class, Foreign path→Runtime path, Foreign decls→Extern decls, FOREIGN function→extern function) across calls/inst/ffi_objc/jni_descriptor/emit_llvm/ c_import/lower.*/ops. src 'foreign' now = ONLY the hash_foreign token + 4 rejection messages (9.0-delete targets). examples/*.sx comments → extern/runtime-class (1219 stdout regen; KEPT 1176). docs/inline-asm-design + debugger purged. Comments only — no build impact. 9.0 ratified: DELETE hash_foreign token next.
22 lines
1004 B
Plaintext
22 lines
1004 B
Plaintext
// Two flat FILE imports each declare the SAME libc symbol `absval` via the
|
|
// `extern` keyword (the linkage-keyword twin of example 0729's `extern`
|
|
// form). The bare-call resolver must NOT count extern authors when deciding
|
|
// ambiguity — they are external C symbols, never rerouted by the bare-call
|
|
// machinery, so the existing first-wins extern dispatch binds the
|
|
// call and a same-name extern collision compiles + runs (prints 7), it does
|
|
// NOT error as ambiguous.
|
|
//
|
|
// Regression (FFI-linkage Part B): `isPlainFreeFn` / `isPlainFreeFnDecl`
|
|
// excluded a `extern` body but classified an empty-block `extern` fn as a
|
|
// plain free function, so the two extern authors were wrongly counted as an
|
|
// ambiguous bare-call collision. Prerequisite for migrating the fn-decl
|
|
// `extern` path onto `extern`.
|
|
#import "modules/std.sx";
|
|
#import "1230-ffi-extern-same-name-authors/a.sx";
|
|
#import "1230-ffi-extern-same-name-authors/b.sx";
|
|
|
|
main :: () -> i32 {
|
|
print("absval = {}\n", absval(-7));
|
|
0
|
|
}
|