mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
use layout first to determine if something is a closure
This commit is contained in:
parent
a88f78d6b7
commit
7b4e87a671
2 changed files with 94 additions and 36 deletions
|
@ -649,7 +649,10 @@ fn layout_from_flat_type<'a>(
|
|||
use roc_types::types::RecordField::*;
|
||||
match field {
|
||||
Optional(_) => {
|
||||
// optional values are not available at this point
|
||||
// when an optional field reaches this stage, the field was truly
|
||||
// optional, and not unified to be demanded or required
|
||||
// therefore, there is no such field on the record, and we ignore this
|
||||
// field from now on.
|
||||
continue;
|
||||
}
|
||||
Required(var) => var,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue