// Variadic heterogeneous type packs — follow-up #3 (bare `args` // reference). The pack-mono doesn't materialise a slice value // for the pack name itself, so any body that references `args` // without indexing (e.g. forwarding to a `[]Any`-typed helper, // or just computing `args.len` through a non-comptime path) // fails with "unresolved 'args'". // // Next commit materialises an `[]Any` slice on demand inside // the mono: each pack param is boxed into Any, stored in a // stack [N x Any] array, and the slice {data_ptr, len} is bound // to the pack name. `args` then resolves as a runtime value // like the pre-2b inline path did. #import "modules/std.sx"; // Helper that takes a slice. Today the pack body can't pass // `args` here because `args` isn't in scope as a value. log_count :: (items: []Any) -> s64 { return items.len; } forward :: (..$args) -> s64 { return log_count(args); } main :: () -> s32 { print("{}\n", forward(1, "hi", 2.5)); return 0; }