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

Members capital case conflict

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 0.6.1
    • Fix Version/s: 0.9.2
    • Component/s: C# - Compiler
    • Labels:
      None
    • Environment:

      Windows 7

      Description

      When generating "csharp" target off the following structure:
      ===
      struct Order {
      1: string col, // sort column name
      2: i32 order // asc(1) or desc(0)
      }
      ===
      the code is generated:
      class Order { public int Order ...

      This code fails to compile in C# compiler because member name is the same as containing clsss name, which is invalid in C#.

      Perhaps there must be a check when generating members and if capitalized member name turns out to be the same as containing class name, then prepend it with underscore.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jensg Jens Geyer
                Reporter:
                vchekan Vadim Chekan
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: