mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-02 03:12:20 +00:00
pass the right region along with inline expects
This commit is contained in:
parent
daec85a75e
commit
29a260a4b3
1 changed files with 6 additions and 3 deletions
|
@ -2692,12 +2692,15 @@ struct ExpectCollector {
|
|||
}
|
||||
|
||||
impl crate::traverse::Visitor for ExpectCollector {
|
||||
fn visit_expr(&mut self, expr: &Expr, region: Region, var: Variable) {
|
||||
fn visit_expr(&mut self, expr: &Expr, _region: Region, var: Variable) {
|
||||
if let Expr::Expect {
|
||||
lookups_in_cond, ..
|
||||
lookups_in_cond,
|
||||
loc_condition,
|
||||
..
|
||||
} = expr
|
||||
{
|
||||
self.expects.insert(region, lookups_in_cond.to_vec());
|
||||
self.expects
|
||||
.insert(loc_condition.region, lookups_in_cond.to_vec());
|
||||
}
|
||||
|
||||
walk_expr(self, expr, var)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue