mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
possible_reuse_symbol_or_specialize
This commit is contained in:
parent
16da790fac
commit
452bafc616
1 changed files with 7 additions and 11 deletions
|
@ -4924,7 +4924,6 @@ pub fn with_hole<'a>(
|
||||||
// Strategy: turn a record update into the creation of a new record.
|
// Strategy: turn a record update into the creation of a new record.
|
||||||
// This has the benefit that we don't need to do anything special for reference
|
// This has the benefit that we don't need to do anything special for reference
|
||||||
// counting
|
// counting
|
||||||
|
|
||||||
let sorted_fields_result = {
|
let sorted_fields_result = {
|
||||||
let mut layout_env = layout::Env::from_components(
|
let mut layout_env = layout::Env::from_components(
|
||||||
layout_cache,
|
layout_cache,
|
||||||
|
@ -4961,18 +4960,15 @@ pub fn with_hole<'a>(
|
||||||
|
|
||||||
let original_struct_symbol = env.unique_symbol();
|
let original_struct_symbol = env.unique_symbol();
|
||||||
if let Some(field) = updates.get(label) {
|
if let Some(field) = updates.get(label) {
|
||||||
// TODO this should probably used around here.
|
|
||||||
// let field_symbol = possible_reuse_symbol_or_specialize(
|
|
||||||
// env,
|
|
||||||
// procs,
|
|
||||||
// layout_cache,
|
|
||||||
// &field.loc_expr.value,
|
|
||||||
// field.var,
|
|
||||||
// );
|
|
||||||
|
|
||||||
env.struct_indexing
|
env.struct_indexing
|
||||||
.insert(record_index, original_struct_symbol);
|
.insert(record_index, original_struct_symbol);
|
||||||
let new_struct_symbol = env.unique_symbol();
|
let new_struct_symbol = possible_reuse_symbol_or_specialize(
|
||||||
|
env,
|
||||||
|
procs,
|
||||||
|
layout_cache,
|
||||||
|
&field.loc_expr.value,
|
||||||
|
field.var,
|
||||||
|
);
|
||||||
new_struct_symbols.push(new_struct_symbol);
|
new_struct_symbols.push(new_struct_symbol);
|
||||||
fields.push(UpdateExisting(field));
|
fields.push(UpdateExisting(field));
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue