check inside a lambda set for whether it is reference counted

This commit is contained in:
Folkert 2023-07-26 20:06:37 +02:00
parent 73ffce0baa
commit 334253f47f
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
7 changed files with 34 additions and 31 deletions

View file

@ -365,7 +365,7 @@ impl<'a> LowLevelCall<'a> {
);
// Increment refcount
if self.ret_layout_raw.is_refcounted() {
if self.ret_layout_raw.is_refcounted(backend.layout_interner) {
let inc_fn = backend.get_refcount_fn_index(self.ret_layout, HelperOp::Inc);
backend.code_builder.get_local(elem_local);
backend.code_builder.i32_const(1);