anchor.diff:      end.
   
   %% pattern_fields([PatField],RecordName,[RecDefField],
  -%%                VarTable,Old,Bvt,State) ->
  +%%                VarTable,Old,State) ->
   %%      {UpdVarTable,UpdBinVarTable,State}.
   
  -pattern_fields(Fs, Name, Fields, Vt0, Old, Bvt, St0) ->
  -    CheckFun = fun (Val, Vt, St) -> pattern(Val, Vt, Old, Bvt, St) end,
  +pattern_fields(Fs, Name, Fields, Vt0, Old, St0) ->
  +    CheckFun = fun (Val, Vt, St) -> pattern(Val, Vt, Old, St) end,
       {_SeenFields,Uvt,Bvt1,St1} =
           foldl(fun (Field, {Sfsa,Vta,Bvt1,Sta}) ->
                         case check_field(Field, Name, Fields,
  
positive.code:     %% Forget variables local to E immediately.
      Vt1 = vtupdate(vtold(Evt, Vt), Vt),
      {_, St2} = check_unused_vars(Evt, Vt, St1),
      {Pvt,Binvt,St3} = pattern(P, Vt1, [], [], St2),
      %% Have to keep fresh variables separated from used variables somehow
      %% in order to handle for example X = foo(), [X || <<X:X>> <- bar()].
      %%                                1           2      2 1
  
negative.code:     erl_internal:arith_op(Op, 2) andalso all(fun is_pattern_expr/1, [A1,A2]);
  is_pattern_expr_1(_Other) -> false.
  
  pattern_map(Ps, Vt, Old, St) ->
      foldl(fun({map_field_assoc,L,_,_}, {Psvt,Bvt0,St0}) ->
                    {Psvt,Bvt0,add_error(L, illegal_pattern, St0)};
               ({map_field_exact,_L,K,V}, {Psvt,Bvt0,St0}) ->
                    St1 = St0#lint{gexpr_context=map_key},
                    {Kvt,St2} = gexpr(K, Vt, St1),
                    {Vvt,Bvt2,St3} = pattern(V, Vt, Old, St2),
                    {vtmerge_pat(vtmerge_pat(Kvt, Vvt), Psvt),
                     vtmerge_pat(Bvt0, Bvt2),
                     St3}
            end, {[],[],St}, Ps).
  
  %% pattern_bin([Element], VarTable, Old, State) ->
  %%           {UpdVarTable,UpdBinVarTable,State}.
  %%  Check a pattern group. BinVarTable are used binsize variables.
  
  pattern_bin(Es, Vt, Old, St0) ->
      {_Sz,Esvt,Bvt,St1} = foldl(fun (E, Acc) ->
  				       pattern_element(E, Vt, Old, Acc)
  			       end,
  			       {0,[],[],St0}, Es),
      {Esvt,Bvt,St1}.
  
  pattern_element({bin_element,Line,{string,_,_},Size,Ts}=Be, Vt,
  