mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
simplify empty let constraint
This commit is contained in:
parent
a20a828ee1
commit
a1dbdf34d5
1 changed files with 2 additions and 15 deletions
|
@ -1765,14 +1765,7 @@ pub fn rec_defs_help(
|
||||||
NoExpectation(expr_type),
|
NoExpectation(expr_type),
|
||||||
);
|
);
|
||||||
|
|
||||||
// TODO investigate if this let can be safely removed
|
let def_con = expr_con;
|
||||||
let def_con = constraints.let_constraint(
|
|
||||||
[],
|
|
||||||
[], // empty because Roc function defs have no args
|
|
||||||
[], // empty because Roc function defs have no args
|
|
||||||
Constraint::True, // I think this is correct, once again because there are no args
|
|
||||||
expr_con,
|
|
||||||
);
|
|
||||||
|
|
||||||
flex_info.vars = def_pattern_state.vars;
|
flex_info.vars = def_pattern_state.vars;
|
||||||
flex_info.constraints.push(def_con);
|
flex_info.constraints.push(def_con);
|
||||||
|
@ -1983,13 +1976,7 @@ pub fn rec_defs_help(
|
||||||
);
|
);
|
||||||
|
|
||||||
let cons = [
|
let cons = [
|
||||||
constraints.let_constraint(
|
ret_constraint,
|
||||||
[],
|
|
||||||
[],
|
|
||||||
[],
|
|
||||||
Constraint::True,
|
|
||||||
ret_constraint,
|
|
||||||
),
|
|
||||||
// Store type into AST vars. We use Store so errors aren't reported twice
|
// Store type into AST vars. We use Store so errors aren't reported twice
|
||||||
constraints.store(signature, expr_var, std::file!(), std::line!()),
|
constraints.store(signature, expr_var, std::file!(), std::line!()),
|
||||||
];
|
];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue