Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-2163

incorrect Delphi code generated for typedef'ed constants

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Delphi - Compiler
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      The following IDL

      typedef map<string,Bonk> MapType
      const ThriftTest.MapType MAPCONSTANT = {'hello':{}, 'goodnight':{}}
      

      creates uncompileable code at FMAPCONSTANT, because TMapType is a reference to an interface type, not the implementing class type:

      class constructor TConstants.Create;
      begin
        FMAPCONSTANT := TMapType.Create;
      end;
      

      Expected code would be

      class constructor TConstants.Create;
      begin
        FMAPCONSTANT := TThriftDictionaryImpl<string, IBonk>.Create;
        FMAPCONSTANT.Add( 'hello', TBonkImpl.Create);
        FMAPCONSTANT.Add( 'goodnight', TBonkImpl.Create);
      end;
      

        Attachments

          Activity

            People

            • Assignee:
              jensg Jens Geyer
              Reporter:
              jensg Jens Geyer

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment