mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00
s/assignment/def
This commit is contained in:
parent
8fc91ad743
commit
9c190e4a63
4 changed files with 110 additions and 122 deletions
|
@ -43,16 +43,16 @@ pub fn solve(env: &Env, subs: &mut Subs, constraint: &Constraint) {
|
|||
True => {
|
||||
// If the return expression is guaranteed to solve,
|
||||
// solve the assignments themselves and move on.
|
||||
solve(env, subs, &let_con.assignments_constraint)
|
||||
solve(env, subs, &let_con.defs_constraint)
|
||||
}
|
||||
ret_con => {
|
||||
// Solve the assignments' constraints first.
|
||||
solve(env, subs, &let_con.assignments_constraint);
|
||||
solve(env, subs, &let_con.defs_constraint);
|
||||
|
||||
// Add a variable for each assignment to the env.
|
||||
let mut new_env = env.clone();
|
||||
|
||||
for (symbol, loc_type) in let_con.assignment_types.iter() {
|
||||
for (symbol, loc_type) in let_con.def_types.iter() {
|
||||
// We must not overwrite existing symbols! If we do,
|
||||
// we will overwrite procedure entries, which were
|
||||
// inserted earlier in solving. (If we allowed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue