mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
Fix dev backend pointer bug
When using pointers as keys, new ones shouldn't get created. Always reference an existing item.
This commit is contained in:
parent
564aacc1fd
commit
1a98ec290e
2 changed files with 7 additions and 8 deletions
|
@ -104,9 +104,9 @@ where
|
|||
fail: _,
|
||||
} => {
|
||||
// for now, treat invoke as a normal call
|
||||
|
||||
let stmt = Stmt::Let(*symbol, Expr::Call(call.clone()), *layout, pass);
|
||||
self.build_stmt(&stmt)
|
||||
self.build_expr(symbol, &Expr::Call(call.clone()), layout)?;
|
||||
self.free_symbols(stmt);
|
||||
self.build_stmt(pass)
|
||||
}
|
||||
Stmt::Switch {
|
||||
cond_symbol,
|
||||
|
@ -478,15 +478,15 @@ where
|
|||
|
||||
Stmt::Invoke {
|
||||
symbol,
|
||||
layout,
|
||||
layout: _,
|
||||
call,
|
||||
pass,
|
||||
fail: _,
|
||||
} => {
|
||||
// for now, treat invoke as a normal call
|
||||
|
||||
let stmt = Stmt::Let(*symbol, Expr::Call(call.clone()), *layout, pass);
|
||||
self.scan_ast(&stmt);
|
||||
self.set_last_seen(*symbol, stmt);
|
||||
self.scan_ast_call(call, stmt);
|
||||
self.scan_ast(pass);
|
||||
}
|
||||
|
||||
Stmt::Switch {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue