mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-23 03:52:27 +00:00
inline dbg
This commit is contained in:
parent
dcb530d3af
commit
e7f3c6f281
18 changed files with 192 additions and 21 deletions
|
@ -656,6 +656,35 @@ pub fn constrain_expr(
|
|||
constraints.exists_many(vars, all_constraints)
|
||||
}
|
||||
|
||||
Dbg {
|
||||
loc_condition,
|
||||
loc_continuation,
|
||||
variable,
|
||||
} => {
|
||||
let dbg_type = constraints.push_variable(*variable);
|
||||
let expected_dbg = constraints.push_expected_type(Expected::NoExpectation(dbg_type));
|
||||
|
||||
let cond_con = constrain_expr(
|
||||
types,
|
||||
constraints,
|
||||
env,
|
||||
loc_condition.region,
|
||||
&loc_condition.value,
|
||||
expected_dbg,
|
||||
);
|
||||
|
||||
let continuation_con = constrain_expr(
|
||||
types,
|
||||
constraints,
|
||||
env,
|
||||
loc_continuation.region,
|
||||
&loc_continuation.value,
|
||||
expected,
|
||||
);
|
||||
|
||||
constraints.exists_many([], [cond_con, continuation_con])
|
||||
}
|
||||
|
||||
If {
|
||||
cond_var,
|
||||
branch_var,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue