mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
test for record diff
This commit is contained in:
parent
fc8d9c2fd9
commit
2d6e47b8a6
5 changed files with 72 additions and 17 deletions
|
@ -238,8 +238,9 @@ pub fn constrain_expr(
|
|||
let fn_type = Variable(*fn_var);
|
||||
let fn_region = loc_fn.region;
|
||||
let fn_expected = NoExpectation(fn_type.clone());
|
||||
// TODO look up the name and use NamedFnArg if possible.
|
||||
let fn_reason = Reason::AnonymousFnCall {
|
||||
|
||||
let fn_reason = Reason::FnCall {
|
||||
name: opt_symbol,
|
||||
arity: loc_args.len() as u8,
|
||||
};
|
||||
|
||||
|
@ -260,8 +261,9 @@ pub fn constrain_expr(
|
|||
for (index, (arg_var, loc_arg)) in loc_args.iter().enumerate() {
|
||||
let region = loc_arg.region;
|
||||
let arg_type = Variable(*arg_var);
|
||||
// TODO look up the name and use NamedFnArg if possible.
|
||||
let reason = Reason::AnonymousFnArg {
|
||||
|
||||
let reason = Reason::FnArg {
|
||||
name: opt_symbol,
|
||||
arg_index: index as u8,
|
||||
};
|
||||
let expected_arg = ForReason(reason, arg_type.clone(), region);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue