Add Layout::Erased

This commit is contained in:
Ayaz Hafiz 2023-07-02 12:16:14 -05:00
parent 283b9d53d6
commit 7ea85e44d2
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
18 changed files with 58 additions and 14 deletions

View file

@ -537,7 +537,9 @@ fn jit_to_ast_help<'a, A: ReplApp<'a>>(
LayoutRepr::Ptr(_) => {
unreachable!("Ptr will never be visible to users")
}
LayoutRepr::LambdaSet(_) | LayoutRepr::FunctionPointer(_) => OPAQUE_FUNCTION,
LayoutRepr::LambdaSet(_) | LayoutRepr::FunctionPointer(_) | LayoutRepr::Erased(_) => {
OPAQUE_FUNCTION
}
};
apply_newtypes(env, newtype_containers.into_bump_slice(), expr)
@ -575,7 +577,7 @@ fn addr_to_ast<'a, M: ReplAppMemory>(
let raw_content = env.subs.get_content_without_compacting(raw_var);
let expr = match (raw_content, layout) {
(Content::Structure(FlatType::Func(_, _, _)), _) | (_, LayoutRepr::LambdaSet(_) | LayoutRepr::FunctionPointer(_)) => {
(Content::Structure(FlatType::Func(_, _, _)), _) | (_, LayoutRepr::LambdaSet(_) | LayoutRepr::FunctionPointer(_) | LayoutRepr::Erased(_)) => {
OPAQUE_FUNCTION
}
(_, LayoutRepr::Builtin(Builtin::Bool)) => {