From 313fd69e8cb69e4477fde49b64e2cd86b2315bb3 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Sat, 23 Feb 2019 09:09:47 -0800 Subject: [PATCH] feat(library/compiler/borrowed_annotation): mark objects as owned when stored in constructors @kha --- src/library/compiler/borrowed_annotation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/library/compiler/borrowed_annotation.cpp b/src/library/compiler/borrowed_annotation.cpp index 4aa2c07ac6..43dceea762 100644 --- a/src/library/compiler/borrowed_annotation.cpp +++ b/src/library/compiler/borrowed_annotation.cpp @@ -143,7 +143,7 @@ class borrow_inference_fn { if (is_cases_on_app(m_env, e)) { for (unsigned i = 1; i < args.size(); i++) collect(args[i]); - } else if (is_llnf_apply(fn) || is_llnf_closure(fn) || is_llnf_reset(fn)) { + } else if (is_llnf_apply(fn) || is_llnf_closure(fn) || is_llnf_reset(fn) || is_llnf_cnstr(fn) || is_llnf_reuse(fn)) { mark_owned(args); } else if (!is_llnf_op(fn)) { bool tail_call = terminal && (m_decls[m_curr_fidx].fst() == const_name(fn));