| 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 | |
| 4 | export TestCase := Rectangle { |
| 5 | property<bool> checked; |
| 6 | property <int> border; |
| 7 | states [ |
| 8 | checked when checked: { |
| 9 | text.color: red; |
| 10 | <<<<< // FIXME: we should only report one error |
| 11 | // ^error{Syntax error: expected Identifier} |
| 12 | // ^^error{Syntax error: expected '\]'} |
| 13 | // ^^^error{Parse error} |
| 14 | border: 42; |
| 15 | } |
| 16 | ] |
| 17 | // ^error{Parse error: expected a top-level item such as a component, a struct, or a global} |
| 18 | |
| 19 | transitions [ |
| 20 | in pressed: { |
| 21 | animate * { duration: 88ms; } |
| 22 | animate color { duration: 88ms; } |
| 23 | } |
| 24 | ] |
| 25 | |
| 26 | text := Text {} |
| 27 | touch := TouchArea {} |
| 28 | |
| 29 | } |
| 30 | |