mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
thread reset-reuse through
This commit is contained in:
parent
5bb3146aa8
commit
ee67ee546a
5 changed files with 85 additions and 55 deletions
|
@ -832,7 +832,14 @@ fn expr_spec(
|
|||
match expr {
|
||||
Literal(literal) => literal_spec(builder, block, literal),
|
||||
Call(call) => call_spec(builder, env, block, layout, call),
|
||||
Tag {
|
||||
Reuse {
|
||||
tag_layout,
|
||||
tag_name: _,
|
||||
tag_id,
|
||||
arguments,
|
||||
..
|
||||
}
|
||||
| Tag {
|
||||
tag_layout,
|
||||
tag_name: _,
|
||||
tag_id,
|
||||
|
@ -914,8 +921,12 @@ fn expr_spec(
|
|||
Err(()) => unreachable!("empty array does not have a list layout"),
|
||||
}
|
||||
}
|
||||
Reuse { .. } => todo!("currently unused"),
|
||||
Reset(_) => todo!("currently unused"),
|
||||
Reset(symbol) => {
|
||||
let type_id = layout_spec(builder, layout)?;
|
||||
let value_id = env.symbols[symbol];
|
||||
|
||||
builder.add_unknown_with(block, &[value_id], type_id)
|
||||
}
|
||||
RuntimeErrorFunction(_) => {
|
||||
let type_id = layout_spec(builder, layout)?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue