Commit Graph

3 Commits

Author SHA1 Message Date
Olivier De Cannière 349a180967 tst_qmlcppcodegen: Compile test with QT_NO_CAST_FROM_ASCII
This should help find raw string literals in generated code

Task-number: QTBUG-129797
Change-Id: I66e5d6302319678b494030e8cb3459eb06f0f134
Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
2024-10-09 16:23:14 +02:00
Olivier De Cannière 2b336217b0 Compiler: Add tests for the nullish coalescing operator ??
Now that initial support for optional chaining was added, it would be
good to add tests ensuring the nullish coalescing works as expected. Add
some tests to enshrine the behavior.

The compiler is currently not smart enough to detect that
"(Anything as int) ?? 1" will always return an int. It returns an
optional int instead. Created QTBUG-119437.

Task-number: QTBUG-119437
Change-Id: If2d72b0c29e5844cd962dbf92406bfa9181a1bc7
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-02-16 20:31:30 +01:00
Olivier De Cannière fc4ee77116 Compiler: Add initial support for optional chaining
This patch implements the GetOptionalLookup instruction in the compiler.
This enables the use of optional chains.

Fixes: QTBUG-111283
Change-Id: I265f611415a946468b828b9d41f549acfcc76233
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-11-24 18:34:03 +01:00