anchor.diff:      end.
   
           
  -gen_alias_type(Context, ParentPiqi, Alias) ->
  +gen_alias_type(Context, Alias) ->
       case Alias#alias.type =:= 'undefined' andalso Alias#alias.erlang_type =:= 'undefined' of
           true ->
               % this is an alias for a built-in type (piqi_type field must be
               % defined when neither of type and erlang_type fields are present)
  -            gen_builtin_type(ParentPiqi, Alias#alias.piqi_type);
  +            gen_builtin_type(Context, Alias#alias.piqi_type);
           false ->
               case piqic:is_builtin_alias(Alias) of
                   true ->
  
positive.code:     {ParentPiqi, Typedef} = resolve_type_name(Context, TypeName),
      case Typedef of
          {alias, X} ->
              gen_alias_type(Context, ParentPiqi, X);
          _ -> % piqi_record | variant | list | enum
              LocalName = typedef_erlname(Typedef),
              % make scoped name based on the parent module's type prefix
  
negative.code:                 false ->
                      % for non-builtin types, we just use the name of already
                      % generated -type
                      Piqi = Context#context.piqi,
                      _ScopedName = Piqi#piqi.erlang_type_prefix ++ Alias#alias.erlang_name
              end
      end.
  
  
  gen_builtin_type(Context, PiqiType) ->
      case PiqiType of
          any ->
              Piqi = Context#context.piqi,
              case piqic:is_self_spec(Piqi) of
                  true ->
                      _ScopedName = Piqi#piqi.erlang_type_prefix ++ "any";
                  false ->
                      % but the default piqi_piqi.erl definitely doesn't have type
                      % prefixes, therefore we can use the standard Erlang name
  