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

Wrong parse error with Lambda

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2: Important P2: Important
    • None
    • Qt Creator 3.2.0-beta1
    • C/C++/Obj-C++ Support
    • None
    • OS X 10.9

      The "registerIntVariable" calls in EditorManager::init() (in 3.2 branch) show parsing errors "duplicate data type in declaration" on the "[]() -> int" in Qt Creator though they are valid.

          VariableManager::registerIntVariable(kCurrentDocumentXPos,
              tr("X-coordinate of the current editor's upper left corner, relative to screen."),
              []() -> int {
                  IEditor *editor = currentEditor();
                  return editor ? editor->widget()->mapToGlobal(QPoint(0, 0)).x() : 0;
              });
      
      

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

            kosjar Nikolai Kosjar
            con Eike Ziller
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes