Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-29723

Operator < and > inside if shows wrong error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • Qt Creator 11.0.3
    • C/C++/Obj-C++ Support

    Description

      The following code is underlined in red as a syntax error but it is not because it compiles without errors.

      bool ok;
      int id = 0; // any value
      if (!ok || id < 1 || id > 308)
      

      The error in the tooltip shows: "Expected token ')' got '308'

      Edit: Changed from {code} to {noformat} for removing incorrect ">" at beginning of line which Jira inserted mistakenly.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kandeler Christian Kandeler
            capday Abraham Santos
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes