1 | // Copyright © SixtyFPS GmbH <info@slint.dev> |
2 | // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial |
3 | |
4 | // This is a test for a crash withthe interpreter when evaluating properties |
5 | |
6 | global Settings := { |
7 | property <bool> test; |
8 | property <color> some_color; |
9 | property <string> some_string; |
10 | property <int> count; |
11 | property <{aa: bool, bb: int, cc: string}> object; |
12 | } |
13 | |
14 | export Demo := Window { |
15 | width: 300px; |
16 | height: 300px; |
17 | |
18 | title: Settings.some_string; |
19 | |
20 | r:= Rectangle { |
21 | background: Settings.test ? Settings.some_color : Settings.some_color; |
22 | } |
23 | |
24 | for foo in Settings.count: Rectangle {} |
25 | |
26 | property <bool> obj: !Settings.object.aa && Settings.object.bb == 0 && Settings.object.cc == "" ; |
27 | |
28 | property <bool> test: title == "" && r.background == Settings.some_color && Settings.count == 0 && obj; |
29 | |
30 | } |
31 | |