A trailing `..args: []T` on an `extern` fn must map to the C `...` tail like its `#foreign` twin (example 1218). Today the variadic handling in both declareFunction (is_variadic drop) and packVariadicCallArgs (call-site early-out) is gated on `#foreign` only, so a variadic `extern` keeps the trailing slice param and slice-packs the extras — garbage at the C ABI (probe: sum_ints(3,10,20,30) → 53316585, not 60). Example 1229 pins the DESIRED correct output; the next commit extends both gates to cover extern and greens it. Prerequisite for migrating the fn-decl `#foreign` path onto `extern`. 645 corpus (1229 xfail), 444 unit.
5 lines
127 B
Plaintext
5 lines
127 B
Plaintext
sum_ints(3, 10, 20, 30) = 60
|
|
sum_ints(0) = 0
|
|
avg_doubles(2) = 2.000000
|
|
avg_doubles(3) = 2.000000
|