From 4121ba9ea9707e0c42f1319ffcc227bb378b0052 Mon Sep 17 00:00:00 2001 From: Henrixounez <30901439+Henrixounez@users.noreply.github.com> Date: Sat, 19 Sep 2020 02:15:47 +0200 Subject: [PATCH] parser: fix error about multiple modules showing when eof (#6423) --- vlib/v/parser/parser.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/parser/parser.v b/vlib/v/parser/parser.v index 783660730f..6717351ab6 100644 --- a/vlib/v/parser/parser.v +++ b/vlib/v/parser/parser.v @@ -1523,7 +1523,7 @@ fn (mut p Parser) import_stmt() ast.Import { } pos_t := p.tok.position() if import_pos.line_nr == pos_t.line_nr { - if p.tok.kind != .lcbr { + if p.tok.kind !in [.lcbr, .eof] { p.error_with_pos('cannot import multiple modules at a time', pos_t) } }