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

Thrift IDL grammar allows for dotted identifier names

    XMLWordPrintableJSON

Details

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

    Description

      Hi all,

      Recently I noticed that the Thrift grammar allows for identifiers that are illegal in most (if not all) supported languages, like:

      enum Additional.Requirement {
        Speak.My.Language = 0,
      }
      
      typedef list< Additional.Requirement>  Even.Further.Requirements
      
      struct Place.Order {
        3 : optional Even.Further.Requirements    My.Further.Requirements
      }
      

      and so on.
      The compiler generates code from that without a single complaining. Of course, the generated code does not compile.

      Before I submit a patch to address this, I'd like to know
      a) Is there any (supported) language where such a construct would be legal and expected?
      b) Anyone around here that knows whys the grammar allows this? By intention or simply a bug?

      Thanks,
      Jens

      Attachments

        1. dotted_identifiers.thrift
          0.8 kB
          Jens Geyer

        Issue Links

          Activity

            People

              jensg Jens Geyer
              jensg Jens Geyer
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: