toplevel debug

This commit is contained in:
Folkert 2022-11-23 20:29:45 +01:00
parent 928495072c
commit 5ea8d96f3e
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
5 changed files with 70 additions and 10 deletions

View file

@ -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,