You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jens Geyer (JIRA)" <ji...@apache.org> on 2013/09/03 23:41:53 UTC
[jira] [Updated] (THRIFT-2163) incorrect Delphi code generated for
typedef'ed constants
[ https://issues.apache.org/jira/browse/THRIFT-2163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jens Geyer updated THRIFT-2163:
-------------------------------
Summary: incorrect Delphi code generated for typedef'ed constants (was: uncompileable Delphi code generated for typedef'ed constants)
> 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
>
>
> 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