refactor(ffi-linkage): Phase 9.3-src — purge 'foreign' from src/ comments + a user-facing diagnostic
Reword every 'foreign' comment to the extern/runtime-class vocabulary matching the renamed identifiers (foreign call→extern call, foreign class→runtime class, foreign path→runtime path, the #foreign-literal comment mentions → extern, etc.). Also fixes two USER-FACING issues: the 'expected … #foreign … after type annotation' parse error no longer advertises the removed keyword, and the Android 'no #jni_main' help diagnostic now shows '#jni_class(…) extern' instead of the rejected '#foreign #jni_class'. Removed the now-dead prefix-#foreign-vs-postfix conflict branch in parseRuntimeClassDecl (the caller rejects #foreign before it runs). src/ now contains 'foreign' ONLY in the hash_foreign token machinery + its 4 rejection messages — the deprecation mechanism (kept per the 9.0 recommendation; the message MUST name #foreign to guide migration). Snapshot-neutral; suite green (646 corpus / 444 unit, 0 failed).
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
// 2. The `CallPlan` object built by `CallResolver.plan` — its selected
|
||||
// kind / target / variant and the receiver / `__sx_ctx` / default-arg
|
||||
// properties, across every call form pinned by A3.2 sub-step 1
|
||||
// (direct / UFCS / protocol / closure / fn-pointer / foreign / enum /
|
||||
// (direct / UFCS / protocol / closure / fn-pointer / extern / enum /
|
||||
// namespace). `resultType` is just `plan(c).return_type`, so these also
|
||||
// lock the typing the regression suite relies on.
|
||||
|
||||
@@ -346,7 +346,7 @@ test "plan: struct (UFCS) method via #compiler dispatch + prepends receiver" {
|
||||
try std.testing.expect(p.prepends_receiver);
|
||||
}
|
||||
|
||||
test "plan: foreign-class instance vs static dispatch" {
|
||||
test "plan: runtime-class instance vs static dispatch" {
|
||||
var arena = std.heap.ArenaAllocator.init(std.testing.allocator);
|
||||
defer arena.deinit();
|
||||
const alloc = arena.allocator();
|
||||
|
||||
Reference in New Issue
Block a user