mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Convert LayoutRepr::Struct into a tuple variant
This commit is contained in:
parent
a6bda6eccf
commit
a67c148be7
24 changed files with 85 additions and 128 deletions
|
@ -1112,7 +1112,7 @@ fn lowlevel_spec<'a>(
|
|||
|
||||
// depending on the types, the list or value will come first in the struct
|
||||
let fields = match interner.get(layout).repr {
|
||||
LayoutRepr::Struct { field_layouts, .. } => field_layouts,
|
||||
LayoutRepr::Struct(field_layouts) => field_layouts,
|
||||
_ => unreachable!(),
|
||||
};
|
||||
|
||||
|
@ -1541,9 +1541,7 @@ fn layout_spec_help<'a>(
|
|||
|
||||
match interner.get(layout).repr {
|
||||
Builtin(builtin) => builtin_spec(env, builder, interner, &builtin),
|
||||
Struct { field_layouts, .. } => {
|
||||
build_recursive_tuple_type(env, builder, interner, field_layouts)
|
||||
}
|
||||
Struct(field_layouts) => build_recursive_tuple_type(env, builder, interner, field_layouts),
|
||||
LambdaSet(lambda_set) => {
|
||||
layout_spec_help(env, builder, interner, lambda_set.runtime_representation())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue