[
https://issues.apache.org/jira/browse/THRIFT-2163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jens Geyer resolved THRIFT-2163.
--------------------------------
Resolution: Fixed
Committed.
> incorrect Delphi code generated for typedef'ed constants
> --------------------------------------------------------
>
> Key: THRIFT-2163
> URL: https://issues.apache.org/jira/browse/THRIFT-2163
> Project: Thrift
> Issue Type: Bug
> Components: Delphi - Compiler
> Reporter: Jens Geyer
> Assignee: Jens Geyer
> Fix For: 1.0
>
> Attachments:
> THRIFT-2163_incorrect_code_for_typedefed_container_constants.patch
>
>
> The following IDL
> {code}
> typedef map<string,Bonk> MapType
> const ThriftTest.MapType MAPCONSTANT = {'hello':{}, 'goodnight':{}}
> {code}
> creates uncompileable code at FMAPCONSTANT, because TMapType is a reference
> to an interface type, not the implementing class type:
> {code}
> class constructor TConstants.Create;
> begin
> FMAPCONSTANT := TMapType.Create;
> end;
> {code}
> Expected code would be
> {code}
> class constructor TConstants.Create;
> begin
> FMAPCONSTANT := TThriftDictionaryImpl<string, IBonk>.Create;
> FMAPCONSTANT.Add( 'hello', TBonkImpl.Create);
> FMAPCONSTANT.Add( 'goodnight', TBonkImpl.Create);
> end;
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira