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 component Compo inherits Text {
5
6 property <string> background: text;
7// ^error{Unknown unqualified identifier 'text'. Did you mean 'self.text'?}
8
9 Rectangle {
10 background: background;
11// ^error{Cannot convert string to brush}
12 }
13
14 Text {
15 text: background; // works: lookup in the root
16 }
17
18 if true : Rectangle {
19 property <color> text;
20 Text {
21 color: text; // works
22 text: background; // works
23 width: border-color;
24// ^error{Unknown unqualified identifier 'border-color'$}
25 height: text;
26// ^error{Cannot convert color to length}
27 }
28 }
29
30 Rectangle {
31 width: text;
32// ^error{Unknown unqualified identifier 'text'. Did you mean 'root.text'?}
33 }
34
35}
36