@@ -1513,7 +1513,7 @@ do_type_check_expr(Env, {record, Anno, Expr, Record, Fields}) ->
1513
1513
RecTy = {type , erl_anno :new (0 ), record , [{atom , erl_anno :new (0 ), Record }]},
1514
1514
{VB1 , Cs1 } = type_check_expr_in (Env , RecTy , Expr ),
1515
1515
Rec = get_record_fields (Record , Anno , Env # env .tenv ),
1516
- {VB2 , Cs2 } = type_check_fields (Env , Rec , Fields ),
1516
+ {VB2 , Cs2 } = type_check_fields_for_update (Env , Rec , Fields ),
1517
1517
{RecTy , union_var_binds (VB1 , VB2 , Env # env .tenv ), constraints :combine (Cs1 , Cs2 )};
1518
1518
do_type_check_expr (Env , {record , Anno , Record , Fields }) ->
1519
1519
RecTy = {type , erl_anno :new (0 ), record , [{atom , erl_anno :new (0 ), Record }]},
@@ -1703,6 +1703,9 @@ create_fun_type(Arity, RetTy) when is_integer(Arity) ->
1703
1703
ParTys = lists :duplicate (Arity , type (any )),
1704
1704
type ('fun' , [type (product , ParTys ), RetTy ]).
1705
1705
1706
+ type_check_fields_for_update (Env , Rec , Fields ) ->
1707
+ type_check_fields (Env , Rec , Fields , should_not_be_inspected ).
1708
+
1706
1709
type_check_fields (Env , Rec , Fields ) ->
1707
1710
UnAssignedFields = get_unassigned_fields (Fields , Rec ),
1708
1711
type_check_fields (Env , Rec , Fields , UnAssignedFields ).
0 commit comments