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

Thrift compiler does not error when duplicate method names are present

    XMLWordPrintableJSON

Details

    Description

      Thrift does not support method overloading. However, the Thrift compiler reports success when duplicate methods are seen in a service definition.

      Thrift compiles this successfully, however the generated code will not compile.

      #!/usr/local/bin/thrift --gen java
      namespace java tutorial
      service Calculator {
          i32 add(1:i32 num1, 2:i32 num2),
          string add(1:string str1, 2:string str2),
      }
      

      Attachments

        1. 570.diff
          0.6 kB
          Bruce Simpson

        Activity

          People

            bms Bruce Simpson
            robslifka Rob Slifka
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: