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

C++: Fix name collision when a struct has a member named "val"

    XMLWordPrintableJSON

    Details

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

      Description

      When a Thrift "struct" defined in the .thrift IDL file has a member "val", the C++ compiler generates the following faulty code in the setter method for that member variable:

      void MyStruct::__set_val(const int32_t val) {
        val = val;
      __isset.val = true;
      }
      

        Attachments

          Activity

            People

            • Assignee:
              jensg Jens Geyer
              Reporter:
              aspotashev Alexander Potashev
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: