| 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 Xxx := Rectangle { |
| 5 | property <string> err_str1: + "foobar" ; |
| 6 | // ^error{Unary '\+' not supported on string} |
| 7 | property <string> err_str2: - "foobar" ; |
| 8 | // ^error{Unary '-' not supported on string} |
| 9 | property <string> err_str3: "foo" + + "bar" ; |
| 10 | // ^error{Unary '\+' not supported on string} |
| 11 | property <string> err_str4: ! "foobar" ; |
| 12 | // ^error{Cannot convert string to bool} |
| 13 | property <int> ok1: +1; |
| 14 | property <length> ok2: -1cm; |
| 15 | property <string> hey: "foo" + - 45; |
| 16 | property <{x: int}> p1: - { x: 42 }; |
| 17 | // ^error{Unary '\-' not supported on \{ x: float,\}} |
| 18 | property <{x: int}> p2: + { x: 42 }; |
| 19 | // ^error{Unary '\+' not supported on \{ x: float,\}} |
| 20 | property <{x: int}> p3: ! { x: 42 }; |
| 21 | // ^error{Cannot convert \{ x: float,\} to bool} |
| 22 | property <[int]> p4: [!42]; |
| 23 | // ^error{Cannot convert float to bool} |
| 24 | |
| 25 | } |
| 26 | |