mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Initial implementation of tuples in type checking
This leaves in place a bunch of TODOs and likely many bugs - notably, I haven't tested codegen/layout at all here.
This commit is contained in:
parent
d57cb50425
commit
de828416bf
32 changed files with 1785 additions and 112 deletions
|
@ -1087,7 +1087,8 @@ fn fix_values_captured_in_closure_expr(
|
|||
| TypedHole { .. }
|
||||
| RuntimeError(_)
|
||||
| ZeroArgumentTag { .. }
|
||||
| Accessor { .. } => {}
|
||||
| RecordAccessor { .. }
|
||||
| TupleAccessor { .. } => {}
|
||||
|
||||
List { loc_elems, .. } => {
|
||||
for elem in loc_elems.iter_mut() {
|
||||
|
@ -1181,7 +1182,7 @@ fn fix_values_captured_in_closure_expr(
|
|||
}
|
||||
|
||||
Record { fields, .. }
|
||||
| Update {
|
||||
| RecordUpdate {
|
||||
updates: fields, ..
|
||||
} => {
|
||||
for (_, field) in fields.iter_mut() {
|
||||
|
@ -1193,7 +1194,17 @@ fn fix_values_captured_in_closure_expr(
|
|||
}
|
||||
}
|
||||
|
||||
Access { loc_expr, .. } => {
|
||||
Tuple { elems, .. } => {
|
||||
for (_var, expr) in elems.iter_mut() {
|
||||
fix_values_captured_in_closure_expr(
|
||||
&mut expr.value,
|
||||
no_capture_symbols,
|
||||
closure_captures,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
RecordAccess { loc_expr, .. } | TupleAccess { loc_expr, .. } => {
|
||||
fix_values_captured_in_closure_expr(
|
||||
&mut loc_expr.value,
|
||||
no_capture_symbols,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue