mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
check inside a lambda set for whether it is reference counted
This commit is contained in:
parent
73ffce0baa
commit
334253f47f
7 changed files with 34 additions and 31 deletions
|
@ -2843,7 +2843,10 @@ impl<'a> LayoutRepr<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn is_refcounted(&self) -> bool {
|
||||
pub fn is_refcounted<I>(&self, interner: &I) -> bool
|
||||
where
|
||||
I: LayoutInterner<'a>,
|
||||
{
|
||||
use self::Builtin::*;
|
||||
use LayoutRepr::*;
|
||||
|
||||
|
@ -2858,6 +2861,8 @@ impl<'a> LayoutRepr<'a> {
|
|||
|
||||
Erased(_) => true,
|
||||
|
||||
LambdaSet(lambda_set) => interner.is_refcounted(lambda_set.runtime_representation()),
|
||||
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue