mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
clippy
This commit is contained in:
parent
6d31f9e1da
commit
642271d730
1 changed files with 8 additions and 12 deletions
|
@ -860,7 +860,7 @@ fn expr_spec(
|
||||||
Struct(fields) => build_tuple_value(builder, env, block, fields),
|
Struct(fields) => build_tuple_value(builder, env, block, fields),
|
||||||
AccessAtIndex {
|
AccessAtIndex {
|
||||||
index,
|
index,
|
||||||
field_layouts,
|
field_layouts: _,
|
||||||
structure,
|
structure,
|
||||||
wrapped,
|
wrapped,
|
||||||
} => {
|
} => {
|
||||||
|
@ -886,18 +886,14 @@ fn expr_spec(
|
||||||
}
|
}
|
||||||
Wrapped::MultiTagUnion => {
|
Wrapped::MultiTagUnion => {
|
||||||
// Clearly this is not generally correct, but it should be for our examples
|
// Clearly this is not generally correct, but it should be for our examples
|
||||||
let hacky_is_recursive =
|
// let hacky_is_recursive = field_layouts.iter().any(|l| l == &Layout::RecursivePointer);
|
||||||
field_layouts.iter().any(|l| l == &Layout::RecursivePointer);
|
// if hacky_is_recursive {
|
||||||
|
|
||||||
if hacky_is_recursive {
|
// we don't know what constructor we are at this point, so how can we get a
|
||||||
let result_type = layout_spec(builder, layout)?;
|
// field from an enum value?
|
||||||
builder.add_unknown_with(block, &[value_id], result_type)
|
|
||||||
} else {
|
let result_type = layout_spec(builder, layout)?;
|
||||||
// what to do, what to do.
|
builder.add_unknown_with(block, &[value_id], result_type)
|
||||||
let result_type = layout_spec(builder, layout)?;
|
|
||||||
builder.add_unknown_with(block, &[value_id], result_type)
|
|
||||||
// builder.add_get_tuple_field(block, value_id, *index as u32)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue