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

Compiler should fail when duplicate field names are present

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 0.9
    • None
    • Compiler (General)
    • None

    Description

      Thrift accept structs with a duplicate field name if the IDs are different. However, the generated java code does not compile.

      struct duplicate {
          1: i32 field,
          2: i32 field
      }
      
      private static final org.apache.thrift.protocol.TField FIELD_FIELD_DESC = ...
      private static final org.apache.thrift.protocol.TField FIELD_FIELD_DESC = ...
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nicolastr Nicolas Trésegnie
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: