From 68b4dab5824140e4e7a78e82238eaff555496222 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sat, 30 Nov 2019 10:37:28 +0300 Subject: [PATCH] parser: another infinite loop fix --- vlib/compiler/fn.v | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vlib/compiler/fn.v b/vlib/compiler/fn.v index 39715fc18f..41d168c4be 100644 --- a/vlib/compiler/fn.v +++ b/vlib/compiler/fn.v @@ -849,8 +849,10 @@ fn (p mut Parser) fn_args(f mut Fn) { if types_only { for p.tok != .rpar { typ := p.get_type() - if typ == '' && !f.is_c { + if typ == '' { //&& !f.is_c { + if p.prev_tok != .ellipsis { p.error('bad fn arg type') + } } p.check_and_register_used_imported_type(typ) v := Var {