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

parser: another infinite loop fix

This commit is contained in:
Alexander Medvednikov 2019-11-30 10:37:28 +03:00
parent c00a7f3a5e
commit 68b4dab582

View File

@ -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 {