aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qmlls/utils/data/completions/continueAndBreakStatement.qml
blob: 243f206db93534dabcecf99cf905f9d8c746cfd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

import QtQuick

Item {
    function f(x) {
        label1: f(f(x))

        nestedLabel1: for (let i = 0; i < 3; ++i) {
            nestedLabel2: for (let j = 0; j < 3; ++j) {
                continue nestedLabel1;
                break nestedLabel2;
            }
        }

        multiLabel1:
        multiLabel2: {
            f(1 + f(x))
            continue multiLabel1
            break multiLabel2
        }

        for(;;) {
            continue ;
            break ;
        }

        return x + y
    }
}