diff options
Diffstat (limited to 'tests/auto/qmldom/domdata/domitem/variableDeclarations.qml')
-rw-r--r-- | tests/auto/qmldom/domdata/domitem/variableDeclarations.qml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/qmldom/domdata/domitem/variableDeclarations.qml b/tests/auto/qmldom/domdata/domitem/variableDeclarations.qml new file mode 100644 index 0000000000..7d5d2ac9a5 --- /dev/null +++ b/tests/auto/qmldom/domdata/domitem/variableDeclarations.qml @@ -0,0 +1,23 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +import QtQuick + +Item { + function count() { + let one = 1, two = 2, three = 3, four = 4, five = 5, six = 6 + let testMe = 123 + } + // for now only numeric literal and string literal is supported + function f() { + let sum = 0, helloWorld = "hello" + const a = 3; + const b = "patron"; + var aa = helloWorld, bb = aa; + + const bool1 = true; + let bool2 = false; + var nullVar = null; + return sum; + } +} |