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
4struct Str := { foo: Rectangle }
5// ^error{'Rectangle' is not a valid type}
6
7Comp := Rectangle {
8 property <Rectangle> r;
9// ^error{'Rectangle' is not a valid type}
10
11 property <[Rectangle]> ls;
12// ^error{'Rectangle' is not a valid type}
13 property <{foo: Rectangle}> st;
14// ^error{'Rectangle' is not a valid type}
15
16 callback cb1(Rectangle);
17// ^error{'Rectangle' is not a valid type}
18 callback cb2() -> Rectangle;
19// ^error{'Rectangle' is not a valid type}
20}
21
22export Foo := Rectangle {
23 xx := Rectangle { }
24 Comp {
25 r: xx;
26// ^error{Unknown property}
27// ^^error{Cannot take reference of an element}
28 }
29}
30