mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-03 18:29:00 +00:00
fix(REPL): suppress unused vars warn in REPL
This commit is contained in:
parent
89d830c364
commit
06b4df6568
3 changed files with 31 additions and 26 deletions
|
@ -2142,13 +2142,8 @@ impl ASTLowerer {
|
|||
return Err(self.return_incomplete_artifact(hir));
|
||||
}
|
||||
};
|
||||
// TODO: recursive check
|
||||
for chunk in hir.module.iter() {
|
||||
if let Err(warns) = self.use_check(chunk, mode) {
|
||||
self.warns.extend(warns);
|
||||
}
|
||||
}
|
||||
self.warn_unused_vars();
|
||||
self.warn_unused_expr(&hir.module, mode);
|
||||
self.warn_unused_vars(mode);
|
||||
if self.errs.is_empty() {
|
||||
log!(info "the AST lowering process has completed.");
|
||||
Ok(CompleteArtifact::new(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue