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
4global MyType := {
5 property <int> aaa;
6 property <int> aaa;
7// ^error{Cannot override property 'aaa'}
8 property <int> bbb : 42;
9 property <string> ccc;
10
11 ccc: "hello";
12 animate bbb { duration: 100ms; }
13// ^error{A global component cannot have animations}
14 states [ ]
15// ^error{A global component cannot have states}
16 transitions [ ]
17// ^error{A global component cannot have transitions}
18 @children
19// ^error{A global component cannot have sub elements}
20 Rectangle { }
21// ^error{A global component cannot have sub elements}
22 for x in mod : Text { }
23// ^error{A global component cannot have sub elements}
24// ^^error{Builtin function must be called}
25 aaa <=> bbb;
26
27 property <int> eee <=> aaa;
28
29 qqq: 42;
30// ^error{Unknown property qqq}
31
32}
33
34export SuperSimple := Rectangle {
35 MyType {
36// ^error{Cannot create an instance of a global component}
37 ccc: "hello";
38 }
39}
40