1// Copyright © SixtyFPS GmbH <info@slint.dev>
2// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
3
4export NotInIf := Rectangle {
5 if true: Rectangle {
6 @children
7// ^error{The @children placeholder cannot appear in a conditional element}
8 }
9}
10
11export NotInFor := Rectangle {
12 HorizontalLayout {
13 for xxx in 12: Rectangle {
14 VerticalLayout {
15 @children
16// ^error{The @children placeholder cannot appear in a repeated element}
17 }
18 }
19 }
20}
21
22TestBox := Rectangle {
23 @children
24 @children
25// ^error{The @children placeholder can only appear once in an element}
26}
27
28export TestBox2 := Rectangle {
29 Rectangle {
30 @children
31 }
32 @children
33// ^error{The @children placeholder can only appear once in an element hierarchy}
34}
35
36export Final := TestBox {
37 Rectangle {
38 @children
39 }
40}
41