From 15f971ece71abd4a0c5fb22a7d8c03f7559aed16 Mon Sep 17 00:00:00 2001 From: Danil-Lapirow Date: Fri, 1 Nov 2019 12:03:14 +0200 Subject: [PATCH] parser: fix broken methods with vargs --- vlib/compiler/fn.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/compiler/fn.v b/vlib/compiler/fn.v index 773fb06b64..7f9fb0c5ef 100644 --- a/vlib/compiler/fn.v +++ b/vlib/compiler/fn.v @@ -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