mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
fix oversights
This commit is contained in:
parent
74e94869e3
commit
55eff1dba1
10 changed files with 87 additions and 128 deletions
|
@ -2162,19 +2162,18 @@ pub fn build_exp_stmt<'a, 'ctx, 'env>(
|
|||
}
|
||||
DecRef(symbol) => {
|
||||
let (value, layout) = load_symbol_and_layout(scope, symbol);
|
||||
debug_assert!(layout.is_refcounted());
|
||||
|
||||
let value_ptr = value.into_pointer_value();
|
||||
let refcount_ptr = PointerToRefcount::from_ptr_to_data(env, value_ptr);
|
||||
refcount_ptr.decrement(env, layout);
|
||||
if layout.is_refcounted() {
|
||||
let value_ptr = value.into_pointer_value();
|
||||
let refcount_ptr = PointerToRefcount::from_ptr_to_data(env, value_ptr);
|
||||
refcount_ptr.decrement(env, layout);
|
||||
}
|
||||
|
||||
build_exp_stmt(env, layout_ids, scope, parent, cont)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Info(_, cont) => build_exp_stmt(env, layout_ids, scope, parent, cont),
|
||||
|
||||
RuntimeError(error_msg) => {
|
||||
throw_exception(env, error_msg);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue