compiler: fix mark_var_used()

This commit is contained in:
joe-conigliaro 2019-09-24 13:18:06 +10:00 committed by Alexander Medvednikov
parent f7d8fb0cf4
commit a44a03f9a5
2 changed files with 5 additions and 5 deletions

View file

@ -276,10 +276,10 @@ fn (p mut Parser) parse(pass Pass) {
p.cgen.consts << g
case Token.eof:
//p.log('end of parse()')
if p.is_script && !p.pref.is_test {
p.set_current_fn( MainFn )
p.check_unused_variables()
}
// if p.is_script && !p.pref.is_test {
// p.set_current_fn( MainFn )
// p.check_unused_variables()
// }
if !p.first_pass() && !p.pref.is_repl {
p.check_unused_imports()
}