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

CSharp generate invalid code for property named read or write

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.2
    • Fix Version/s: 0.9.3
    • Component/s: C# - Compiler
    • Labels:
      None

      Description

      C# generator will produce invalid code for this

      struct CsFail {
      1: optional bool read
      2: optional bool write
      }

      this will generate code that that will not compile, due to name clash between :

      public bool Read
      {
      get

      { return _read; }

      set

      { __isset.@read = true; this._read = value; }

      }

      and Read method implementation

      public void Read (TProtocol iprot)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jensg Jens Geyer
                Reporter:
                gurubook Luca Sacchi
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: