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