mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-30 21:01:10 +00:00
Update build_hir.rs
This commit is contained in:
parent
a395938413
commit
9b57ade60e
1 changed files with 2 additions and 0 deletions
|
@ -105,9 +105,11 @@ impl HIRBuilder {
|
||||||
let hir = effect_checker
|
let hir = effect_checker
|
||||||
.check(artifact.object)
|
.check(artifact.object)
|
||||||
.map_err(|(hir, errs)| {
|
.map_err(|(hir, errs)| {
|
||||||
|
self.lowerer.ctx.clear_all_vars();
|
||||||
IncompleteArtifact::new(Some(hir), errs, artifact.warns.clone())
|
IncompleteArtifact::new(Some(hir), errs, artifact.warns.clone())
|
||||||
})?;
|
})?;
|
||||||
let hir = self.ownership_checker.check(hir).map_err(|(hir, errs)| {
|
let hir = self.ownership_checker.check(hir).map_err(|(hir, errs)| {
|
||||||
|
self.lowerer.ctx.clear_all_vars();
|
||||||
IncompleteArtifact::new(Some(hir), errs, artifact.warns.clone())
|
IncompleteArtifact::new(Some(hir), errs, artifact.warns.clone())
|
||||||
})?;
|
})?;
|
||||||
Ok(CompleteArtifact::new(hir, artifact.warns))
|
Ok(CompleteArtifact::new(hir, artifact.warns))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue