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

qmlsc: compile error with === or !== against undefined or null

    XMLWordPrintable

Details

    • 583e8c821 (dev), 8e21634f9 (6.6), e4ec9a5b7 (6.5)

    Description

      Window {
          property var foo
          Component.onCompleted: {
              console.log(foo !== null)
              console.log(foo === null)
              console.log(foo !== undefined)
              console.log(foo == undefined)
          }
      }
      

      produces:

      /home/user/tests/build-testing-Desktop_Qt_6_5_1_GCC_64bit-Debug/.rcc/qmlcache/quickcmake_main_qml.cpp:229: error: conversion from ‘bool’ to ‘QChar’ is ambiguous
      /home/user/tests/build-testing-Desktop_Qt_6_5_1_GCC_64bit-Debug/.rcc/qmlcache/quickcmake_main_qml.cpp:229:8: error: conversion from ‘bool’ to ‘QChar’ is ambiguous
        229 | r2_2 = false;
            |        ^~~~~
      

      Attachments

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

        Activity

          People

            olivier.decanniere Olivier De Cannière
            poikelin Joni Poikelin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes