mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
use captured_symbols to determine the closure type
This commit is contained in:
parent
b7e099a6c8
commit
d0f031fe6c
4 changed files with 12 additions and 20 deletions
|
@ -504,6 +504,13 @@ fn layout_from_flat_type<'a>(
|
|||
arena.alloc([Layout::Builtin(builtin.clone())]),
|
||||
arena.alloc(ret),
|
||||
)),
|
||||
Ok(Layout::Struct(&[])) => {
|
||||
// TODO check for stack size of 0, rather than empty record specifically
|
||||
Ok(Layout::FunctionPointer(
|
||||
fn_args.into_bump_slice(),
|
||||
arena.alloc(ret),
|
||||
))
|
||||
}
|
||||
Ok(Layout::Struct(closure_layouts)) => Ok(Layout::Closure(
|
||||
fn_args.into_bump_slice(),
|
||||
closure_layouts,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue