aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qqmlirbuilder.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-06-21 14:06:42 +0200
committerUlf Hermann <ulf.hermann@qt.io>2023-06-26 18:43:10 +0000
commitb4cf8c1f1af444c829e46ad79f778951886cc29d (patch)
tree285152235193f038e800d91bc535f2dd9a992c95 /src/qml/compiler/qqmlirbuilder.cpp
parentcae23efe45ee92b41b7899a28d4d1d7d1048584d (diff)
QML: Revert the default for enforcing function signatures
[ChangeLog][QtQml][Important Behavior Changes] Type annotations on function signatures are now enforced, no matter if the code in question is interpreted, JIT-compiled, or AOT-compiled. Previously, only AOT-compiled code enforced the signatures. Therefore you could produce divergent behavior by passing or returning values that violated the type annotations. Fixes: QTBUG-113527 Fixes: QTBUG-109221 Change-Id: Ie573b31f35813db37b75189e747c764d1b9bbe78 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/compiler/qqmlirbuilder.cpp')
-rw-r--r--src/qml/compiler/qqmlirbuilder.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/qml/compiler/qqmlirbuilder.cpp b/src/qml/compiler/qqmlirbuilder.cpp
index 7a1ea6905a..072894adde 100644
--- a/src/qml/compiler/qqmlirbuilder.cpp
+++ b/src/qml/compiler/qqmlirbuilder.cpp
@@ -1717,10 +1717,9 @@ void QmlUnitGenerator::generate(Document &output, const QV4::CompiledData::Depen
case Pragma::FunctionSignatureBehavior:
switch (p->functionSignatureBehavior) {
case Pragma::Enforced:
- createdUnit->flags |= Unit::FunctionSignaturesEnforced;
break;
case Pragma::Ignored:
- //this is the default;
+ createdUnit->flags |= Unit::FunctionSignaturesIgnored;
break;
}
break;