aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qmlls/utils/data/findUsages/recursive/recursive.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qmlls/utils/data/findUsages/recursive/recursive.qml')
-rw-r--r--tests/auto/qmlls/utils/data/findUsages/recursive/recursive.qml28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/auto/qmlls/utils/data/findUsages/recursive/recursive.qml b/tests/auto/qmlls/utils/data/findUsages/recursive/recursive.qml
new file mode 100644
index 0000000000..45939bc89a
--- /dev/null
+++ b/tests/auto/qmlls/utils/data/findUsages/recursive/recursive.qml
@@ -0,0 +1,28 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+import QtQuick
+
+Item {
+ id: rootId
+ function recursive(n: int): int {
+ if (n > 3)
+ return 1 + recursive(recursive(x-1) + recursive(x-2) - recursive(x-3));
+ else
+ return recursive(0);
+ }
+
+ property int helloRecursive: recursive(42)
+
+ Rectangle {
+ function f() {
+ return rootId.recursive(123)
+ }
+ }
+
+ RecursiveInOtherFile {
+ id: fromOtherFile
+ }
+
+ property int helloRecursiveFromOtherFile: fromOtherFile.recursive(42)
+}