mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
fix problem with empty closures still considered closures
This commit is contained in:
parent
84421ad06d
commit
f5c267acf4
7 changed files with 71 additions and 15 deletions
|
@ -1636,8 +1636,11 @@ fn specialize_external<'a>(
|
|||
Layout::Struct(field_layouts) => {
|
||||
// NOTE closure unions do not store the tag!
|
||||
let field_layouts = &field_layouts[1..];
|
||||
|
||||
// TODO check for field_layouts.len() == 1 and do a rename in that case?
|
||||
for (index, (symbol, _variable)) in captured.iter().enumerate()
|
||||
{
|
||||
// TODO therefore should the wrapped here not be RecordOrSingleTagUnion?
|
||||
let expr = Expr::AccessAtIndex {
|
||||
index: index as _,
|
||||
field_layouts,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue