diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2023-06-21 14:11:41 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2023-06-26 20:42:49 +0200 |
commit | 9eb6240ebd0b7f52ec49aba757a8c355b25203e0 (patch) | |
tree | cff2b25ad5798206830bb1cb1ea1c036610634d6 /tests/auto/qml/qqmllanguage/data | |
parent | a3389d6bf238c46816fd1133c1258102e36c4b10 (diff) |
QML: Improve the JS-to-JS type check when enforcing signatures
We do not have to coerce via the C++ type. Rather, we match the
JavaScript representations of the types and coerce as needed.
Task-number: QTBUG-113527
Change-Id: Id5c30cd46293f2d7aedd699f141a9fe19511b622
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmllanguage/data')
-rw-r--r-- | tests/auto/qml/qqmllanguage/data/signatureEnforced.qml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmllanguage/data/signatureEnforced.qml b/tests/auto/qml/qqmllanguage/data/signatureEnforced.qml index e2ddd75b55..ec00d5d2b3 100644 --- a/tests/auto/qml/qqmllanguage/data/signatureEnforced.qml +++ b/tests/auto/qml/qqmllanguage/data/signatureEnforced.qml @@ -8,7 +8,7 @@ QtObject { property withLength withLength: 5 function a(r: rect) { - r.x = 77 // does not write back + r.x = 77 // does write back, but this is an evil thing to do. } function b(s: string) : int { @@ -28,8 +28,11 @@ QtObject { property int n: c(99) // creates a withLength property int o: rect.y + function bad(b: int) { return b } + Component.onCompleted: { a(rect) d(rect) + bad(15) } } |