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

repl: treat middle imports in a more forgiving way

This commit is contained in:
Delyan Angelov
2020-05-16 22:03:28 +03:00
parent a3a19e899d
commit 62cb48d252
2 changed files with 38 additions and 21 deletions

View File

@@ -39,5 +39,10 @@ fn (p mut Parser) check_unused_imports() {
if output == '' {
return
}
if p.pref.is_repl {
// The REPL should be much more liberal, and should not warn about
// unused imports, because they probably will be in the next few lines...
return
}
eprintln('`$p.file_name` warning: the following imports were never used: $output')
}