Fix failing reporting tests

This commit is contained in:
Ayaz Hafiz 2022-04-21 09:07:43 -04:00 committed by ayazhafiz
parent aa50b141f7
commit c01baa9168
3 changed files with 81 additions and 18 deletions

View file

@ -390,6 +390,17 @@ impl WhenBranch {
}
}
impl WhenBranch {
pub fn region(&self) -> Region {
Region::across_all(
self.patterns
.iter()
.map(|p| &p.region)
.chain([self.value.region].iter()),
)
}
}
pub fn canonicalize_expr<'a>(
env: &mut Env<'a>,
var_store: &mut VarStore,