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

compiler: vargs - for loop support & indexing / dot fixes

This commit is contained in:
joe-conigliaro
2019-10-01 00:11:12 +10:00
committed by Alexander Medvednikov
parent 5ac62bbb75
commit 7311db60a0
4 changed files with 69 additions and 52 deletions

View File

@@ -886,6 +886,7 @@ fn (p mut Parser) fn_call_args(f mut Fn) &Fn {
p.gen('/*YY f=$f.name arg=$arg.name is_moved=$arg.is_moved*/string_clone(')
}
mut typ := p.bool_expression()
if typ.starts_with('...') { typ = typ.right(3) }
if clone {
p.gen(')')
}