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) } }