From cf82561a75ebef9d20bed21dfc3f050611a08e7f Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 18 May 2020 16:47:34 +0200 Subject: 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. Change-Id: I437e77ff38b7d570451cf27ca84e9897b519413f Reviewed-by: Fabian Kosmale (cherry picked from commit 36ac9ab322d00ad8a2139bcf463275e3121bfb1f) --- tests/auto/qml/qmllint/data/goodTypeAssertion.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests') 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 } -- cgit v1.2.3