You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "James E. King, III (JIRA)" <ji...@apache.org> on 2018/03/22 00:59:00 UTC
[jira] [Resolved] (THRIFT-4497) Erlang records should use map() for
map type
[ https://issues.apache.org/jira/browse/THRIFT-4497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James E. King, III resolved THRIFT-4497.
----------------------------------------
Resolution: Fixed
Fix Version/s: 0.12.0
> Erlang records should use map() for map type
> --------------------------------------------
>
> Key: THRIFT-4497
> URL: https://issues.apache.org/jira/browse/THRIFT-4497
> Project: Thrift
> Issue Type: Bug
> Components: Erlang - Compiler
> Affects Versions: 0.11.0
> Reporter: David Hull
> Assignee: David Hull
> Priority: Major
> Fix For: 0.12.0
>
>
> When the Thrift Erlang code generator is given the "maps" option, it generates records with #{} as the field type. However #{} is the type for an empty map. The Erlang [Types and Function Specifications|http://erlang.org/doc/reference_manual/typespec.html#id79546] says:
> {quote}
> Notice that the syntactic representation of {{map()}} is {{#\{any() => any()\}}} (or {{#\{_ => _\}}}), not #\{ \}. The notation #\{ \} specifies the singleton type for the empty map.
> {quote}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)