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

Defaulted struct parameters on a service generates invalid Haskell.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • Haskell - Compiler
    • None
    • GHC 7.6.3
      GHC 7.8.4

    Description

      If we have a service definition that looks something like:

      struct ServiceRequest {
        1: optional bool shouldWork;
      }
      
      service MyService{
        void myService(1:ServiceRequest request = {});
      }
      

      The code generation relating to the service call includes an invocation like this:

      ... = default_ServiceRequest{}
      

      Which is invalid as empty record updates are not allowed.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              seanparsons Sean Parsons
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: