diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-05-18 16:47:34 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-05-20 16:19:27 +0200 |
commit | 36ac9ab322d00ad8a2139bcf463275e3121bfb1f (patch) | |
tree | 6e1753cc82efefb97a7c630f10202988207c2df3 /tests/auto/qml/qmllint | |
parent | 50841f233a78b970830e70452e62e8940ef8f061 (diff) |
qmllint: Fix evaluation of type assertions
Previously, type assertions were ignored. The test case didn't fail
because simple type casts were automatically detected when the derived
objects were instantiated and assigned to base type properties.
Pick-to: 5.15
Change-Id: I437e77ff38b7d570451cf27ca84e9897b519413f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qmllint')
-rw-r--r-- | tests/auto/qml/qmllint/data/goodTypeAssertion.qml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/qml/qmllint/data/goodTypeAssertion.qml b/tests/auto/qml/qmllint/data/goodTypeAssertion.qml index 6f5f52eb6b..85aaf50d06 100644 --- a/tests/auto/qml/qmllint/data/goodTypeAssertion.qml +++ b/tests/auto/qml/qmllint/data/goodTypeAssertion.qml @@ -1,6 +1,9 @@ import QtQuick 2.0 Item { - property QtObject foo: Item { x: 4 } + id: root + function self() { return root } + + property QtObject foo: self() property real foox: (foo as Item).x } |