fix silent merge request wrt record accessors

This commit is contained in:
Folkert 2023-01-25 00:02:19 +01:00
parent ad84e02abf
commit 3417a0e059
No known key found for this signature in database
GPG Key ID: 1F17F6FFD112B97C
3 changed files with 4 additions and 4 deletions

View File

@ -11,11 +11,11 @@ use crate::annotation::OwnedNamedOrAble;
use crate::derive;
use crate::env::Env;
use crate::expr::get_lookup_symbols;
use crate::expr::AccessorData;
use crate::expr::AnnotatedMark;
use crate::expr::ClosureData;
use crate::expr::Declarations;
use crate::expr::Expr::{self, *};
use crate::expr::RecordAccessorData;
use crate::expr::{canonicalize_expr, Output, Recursive};
use crate::pattern::{canonicalize_def_header_pattern, BindingsFromPattern, Pattern};
use crate::procedure::References;
@ -2321,7 +2321,7 @@ fn canonicalize_pending_body<'a>(
let (loc_can_expr, can_output) = (
Loc::at(
loc_expr.region,
Accessor(AccessorData {
RecordAccessor(RecordAccessorData {
name: *defined_symbol,
function_var: var_store.fresh(),
record_var: var_store.fresh(),

View File

@ -5785,7 +5785,7 @@ fn build_pending_specializations<'a>(
}
match body.value {
roc_can::expr::Expr::Accessor(accessor_data) => {
roc_can::expr::Expr::RecordAccessor(accessor_data) => {
let fresh_record_symbol = mono_env.unique_symbol();
let closure_data = accessor_data.to_closure_data(fresh_record_symbol);
register_toplevel_function_into_procs_base(

View File

@ -2389,7 +2389,7 @@ fn from_can_let<'a>(
lower_rest!(variable, cont.value)
}
Accessor(accessor_data) => {
RecordAccessor(accessor_data) => {
let fresh_record_symbol = env.unique_symbol();
let closure_data = accessor_data.to_closure_data(fresh_record_symbol);
debug_assert_eq!(*symbol, closure_data.name);