mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-02 21:44:34 +00:00
Fix a scope escaping bug
This commit is contained in:
parent
fee464945b
commit
06e0b9c1ae
3 changed files with 18 additions and 15 deletions
|
@ -1036,7 +1036,10 @@ impl Context {
|
|||
}
|
||||
|
||||
pub(crate) fn check_decls_and_pop(&mut self) -> Result<Context, TyCheckErrors> {
|
||||
self.check_decls()?;
|
||||
self.check_decls().map_err(|errs| {
|
||||
self.pop();
|
||||
errs
|
||||
})?;
|
||||
Ok(self.pop())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue