1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cgen: use gen_varg var in condition

This commit is contained in:
joe-conigliaro 2020-04-22 13:31:24 +10:00
parent c1e8612624
commit c35e0e49ce

View File

@ -403,7 +403,7 @@ fn (g mut Gen) call_args(args []ast.CallArg, expected_types []table.Type) {
}
arg_no++
}
if is_variadic && !is_forwarding_varg {
if gen_vargs {
varg_type := expected_types[expected_types.len - 1]
struct_name := 'varg_' + g.typ(varg_type).replace('*', '_ptr')
variadic_count := args.len - arg_no