mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
toplevel debug
This commit is contained in:
parent
928495072c
commit
5ea8d96f3e
5 changed files with 70 additions and 10 deletions
|
@ -2348,6 +2348,24 @@ pub fn constrain_decls(
|
|||
|
||||
constraint = constraints.let_constraint([], [], [], expect_constraint, constraint)
|
||||
}
|
||||
Dbg => {
|
||||
let loc_expr = &declarations.expressions[index];
|
||||
let variable = &declarations.variables[index];
|
||||
|
||||
let dbg_type = constraints.push_variable(*variable);
|
||||
let expected = constraints.push_expected_type(Expected::NoExpectation(dbg_type));
|
||||
|
||||
let expect_constraint = constrain_expr(
|
||||
types,
|
||||
constraints,
|
||||
&mut env,
|
||||
loc_expr.region,
|
||||
&loc_expr.value,
|
||||
expected,
|
||||
);
|
||||
|
||||
constraint = constraints.let_constraint([], [], [], expect_constraint, constraint)
|
||||
}
|
||||
Function(function_def_index) => {
|
||||
constraint = constrain_function_def(
|
||||
types,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue