[ https://issues.apache.org/jira/browse/THRIFT-2163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jake Farrell closed THRIFT-2163. -------------------------------- Resolution: Fixed > 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: 0.10.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 was sent by Atlassian JIRA (v6.3.4#6332)