mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
parser: fix broken methods with vargs
This commit is contained in:
parent
bfe039fcba
commit
15f971ece7
1 changed files with 1 additions and 1 deletions
|
@ -1260,7 +1260,7 @@ fn (p mut Parser) fn_call_vargs(f Fn) (string, []string) {
|
|||
p.error_with_token_index('variadic arg index out of range: $va.index/${values.len-1}, vargs are 0 indexed', va.tok_idx)
|
||||
}
|
||||
}
|
||||
if f.args.len > 1 {
|
||||
if !f.is_method && f.args.len > 1 {
|
||||
p.cgen.gen(',')
|
||||
}
|
||||
return varg_def_type, values
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue