Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-128262

error: invalid covariant return type for ‘virtual std::variant<QQmlJSAotFunction

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P0: Blocker
    • 6.9.0 FF
    • 6.9.0 FF
    • QML: Compiler
    • None
    • 8553ed371 (dev)

    Description

      qmlcompilerplus/src/qmlcompilerplus/cppcodegen.cpp
      In file included from /home/qt/work/qt/tqtc-qmlcompilerplus/src/qmlcompilerplus/cppcodegen.cpp:4:
      /home/qt/work/qt/tqtc-qmlcompilerplus/src/qmlcompilerplus/cppcodegen_p.h:45:64: error: invalid covariant return type for ‘virtual std::variant<QQmlJSAotFunction, QQmlJS::DiagnosticMessage> CppCodeGenerator::compileBinding(const QV4::Compiler::Context*, const QmlIR::Binding&, QQmlJS::AST::Node*)’
         45 |     std::variant<QQmlJSAotFunction, QQmlJS::DiagnosticMessage> compileBinding(
            |                                                                ^~~~~~~~~~~~~~
      In file included from /home/qt/work/install/include/QtQmlCompiler/6.9.0/QtQmlCompiler/private/qqmljscodegenerator_p.h:17,
                       from /home/qt/work/qt/tqtc-qmlcompilerplus/src/qmlcompilerplus/bytecodetranslator_p.h:19,
                       from /home/qt/work/qt/tqtc-qmlcompilerplus/src/qmlcompilerplus/cppcodegen_p.h:17:
      /home/qt/work/install/include/QtQmlCompiler/6.9.0/QtQmlCompiler/private/qqmljscompiler_p.h:73:79: note: overridden function is ‘virtual std::variant<QQmlJSAotFunction, QList<QQmlJS::DiagnosticMessage> > QQmlJSAotCompiler::compileBinding(const QV4::Compiler::Context*, const QmlIR::Binding&, QQmlJS::AST::Node*)’
         73 |     virtual std::variant<QQmlJSAotFunction, QList<QQmlJS::DiagnosticMessage>> compileBinding(
            |                                                                               ^~~~~~~~~~~~~~
      /home/qt/work/qt/tqtc-qmlcompilerplus/src/qmlcompilerplus/cppcodegen_p.h:48:64: error: invalid covariant return type for ‘virtual std::variant<QQmlJSAotFunction, QQmlJS::DiagnosticMessage> CppCodeGenerator::compileFunction(const QV4::Compiler::Context*, const QString&, QQmlJS::AST::Node*)’
         48 |     std::variant<QQmlJSAotFunction, QQmlJS::DiagnosticMessage> compileFunction(
            |                                                                ^~~~~~~~~~~~~~~
      /home/qt/work/install/include/QtQmlCompiler/6.9.0/QtQmlCompiler/private/qqmljscompiler_p.h:76:79: note: overridden function is ‘virtual std::variant<QQmlJSAotFunction, QList<QQmlJS::DiagnosticMessage> > QQmlJSAotCompiler::compileFunction(const QV4::Compiler::Context*, const QString&, QQmlJS::AST::Node*)’
         76 |     virtual std::variant<QQmlJSAotFunction, QList<QQmlJS::DiagnosticMessage>> compileFunction(
            |                                                                               ^~~~~~~~~~~~~~~
      In file included from /home/qt/work/install/include/QtCore/qglobal.h:35,
                       from /home/qt/work/install/include/QtCore/6.9.0/QtCore/private/qglobal_p.h:19,
                       from /home/qt/work/install/include/QtQml/6.9.0/QtQml/private/qqmljssourcelocation_p.h:7,
                       from /home/qt/work/install/include/QtQml/6.9.0/QtQml/private/qqmljsastfwd_p.h:7,
                       from /home/qt/work/install/include/QtQml/6.9.0/QtQml/private/qqmljsastvisitor_p.h:18,
                       from /home/qt/work/install/include/QtQml/6.9.0/QtQml/private/qqmljsast_p.h:18,
                       from /home/qt/work/install/include/QtQmlCompiler/6.9.0/QtQmlCompiler/private/qqmljstypepropagator_p.h:17,
                       from /home/qt/work/qt/tqtc-qmlcompilerplus/src/qmlcompilerplus/bytecodetranslator_p.h:17:
      /home/qt/work/qt/tqtc-qmlcompilerplus/src/qmlcompilerplus/cppcodegen.cpp: In lambda function:
      /home/qt/work/qt/tqtc-qmlcompilerplus/src/qmlcompilerplus/cppcodegen.cpp:53:25: error: ‘struct QQmlJS::DiagnosticMessage’ has no member named ‘isValid’
         53 |         Q_ASSERT(error->isValid());
            |                         ^~~~~~~
      /home/qt/work/qt/tqtc-qmlcompilerplus/src/qmlcompilerplus/cppcodegen.cpp: In member function ‘QQmlJSAotFunction CppCodeGenerator::doCompile(const QV4::Compiler::Context*, QQmlJSCompilePass::Function*, QQmlJS::DiagnosticMessage*)’:
      /home/qt/work/qt/tqtc-qmlcompilerplus/src/qmlcompilerplus/cppcodegen.cpp:59:86: error: no matching function for call to ‘QQmlJSBasicBlocks::QQmlJSBasicBlocks(const QV4::Compiler::Context*&, const QV4::Compiler::JSUnitGenerator*&, QQmlJSTypeResolver*, QQmlJSLogger*&)’
         59 |     QQmlJSBasicBlocks basicBlocks(context, m_unitGenerator, &m_typeResolver, m_logger);
            |                      
      ...
      

      Build log: https://ci-files01-hki.ci.qt.io/cilogs/qt/tqtc-qmlcompilerplus/2925f620a9b7622d37443bb0e767a94c1401b3e7/LinuxUbuntu_24_04x86_64LinuxUbuntu_24_04x86_64GCCqtci-linux-Ubuntu-24.04-x86_64-50-671b65Sccache_UseConfigure/8069ede99eb2669862dd53411caa5040d9abf67d/build_1724285275/log.txt.gz

      Details: https://ci-files01-hki.ci.qt.io:8081/coin/integration/qt/tqtc-qmlcompilerplus/tasks/1724285262

      Tested changes (refs/builds/qtci/dev/1724279870):
      https://codereview.qt-project.org/c/qt/tqtc-qmlcompilerplus/+/584700/2 Update dependencies on 'dev' in qt/tqtc-qmlcompilerplus

      Attachments

        For Gerrit Dashboard: QTBUG-128262
        # Subject Branch Project Status CR V

        Activity

          People

            olivier.decanniere Olivier De Cannière
            janihe Jani Heikkinen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes