anchor.diff:  map_fields([{Tag,Line,K,V}|Fs], Vt, St, F) when Tag =:= map_field_assoc;
                                                   Tag =:= map_field_exact ->
       St1 = case is_valid_map_key(K, St) of
  -              true -> St;
  -              {false,Var} -> add_error(Line, {illegal_map_key_variable,Var}, St)
  -          end,
  +	true -> St;
  +	false -> add_error(Line, illegal_map_key, St);
  +	{false,variable,Var} -> add_error(Line, {illegal_map_key_variable,Var}, St)
  +    end,
       {Pvt,St2} = F([K,V], Vt, St1),
       {Vts,St3} = map_fields(Fs, Vt, St2, F),
       {vtupdate(Pvt, Vts),St3};
  
positive.code: 		  "maximum allowed is ~w", [Arity,?MAX_ARGUMENTS]);
  %% --- patterns and guards ---
  format_error(illegal_pattern) -> "illegal pattern";
  format_error({illegal_map_key_variable,K}) ->
      io_lib:format("illegal use of variable ~w in map",[K]);
  format_error(illegal_bin_pattern) ->
  
negative.code:         _ -> true
      end.
  
  %% is_valid_map_key(K,St) -> true | false | {false, Var::atom()}
  %%   check for value expression without variables
  
  is_valid_map_key(K,St) ->
      case expr(K,[],St) of
  	{[],_} ->
  	    is_valid_map_key_value(K);
  	{[Var|_],_} ->
  	    {false,variable,element(1,Var)}
      end.
  
  is_valid_map_key_value(K) ->
      case K of
  	{char,_,_} -> true;
  	{integer,_,_} -> true;
  	{float,_,_} -> true;
  	{string,_,_} -> true;
  	{nil,_} -> true;
  	{atom,_,_} -> true;
  	{cons,_,H,T} ->
  	    is_valid_map_key_value(H) andalso
  	    is_valid_map_key_value(T);
  	{tuple,_,Es} ->
  	    foldl(fun(E,B) ->
  			B andalso is_valid_map_key_value(E)
  		end,true,Es);
  	{bin,_,Es} ->
  	    % only check for value expressions to be valid
  	    % invalid binary expressions are later checked in
  	    % core and kernel
  	    foldl(fun
  		    ({bin_element,_,E,_,_},B) ->
  			B andalso is_valid_map_key_value(E)
  		end,true,Es);
  	_ -> false
      end.
  
  %% record_def(Line, RecordName, [RecField], State) -> State.
  