parser: another infinite loop fix

pull/2940/head
Alexander Medvednikov 2019-11-30 10:37:28 +03:00
parent c00a7f3a5e
commit 68b4dab582
1 changed files with 3 additions and 1 deletions

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 {