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

Forward slash in comment causes compiler error

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.10.0
    • Compiler (General)
    • None

    Description

      This comment in a .thrift file will cause a parse error:

      /**
       * /
       */
      

      For example:

      $ thrift -version                 
      Thrift version 0.9.3
      $ cat example.thrift              
      namespace java com.example
      
      /**
       * /
       */
      struct Foo {}
      $ thrift --gen java example.thrift
      [ERROR:/Users/ryangreenberg/workspace/source/example.thrift:3] (last token was '/')
      Unexpected token in input: "/"
      

      This bug was encountered because of a reference to an absolute file path in a docblock comment (e.g. * /var/log/…)

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jensg Jens Geyer
            ryangreenberg Ryan Greenberg
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment