slint/internal/compiler/tests/syntax
Olivier Goffart 31867fad61
compiler: Reject comparison on unsupported types
The compiler was accepting the comparison of types such as color, or
struct, and then later we'd get rust compilation error or interpreter
panic.

Example seen in the crash reporter:
`internal/interpreter/eval.rs:257:35`
```
unsupported Value::Brush(SolidColor(Color { red: 0, green: 0, blue: 0, alpha: 0 })) ≤ Value::Brush(SolidColor(Color { red: 255, green: 0, blue: 0, alpha: 255 }))
```

Note that some code hapenned to compile with rust or C++.
For example, comparison of bool, or anonymous struct (represented as
tuples), or color represeted as int)
So technically this is a breaking change.
But this should be fine as this was not working in the interpreter and
this is a bug fix.

ChangeLog: Slint compilation error for comparison of types that can't be
compared with less or greater operator.
2025-05-07 11:39:27 +02:00
..
accessibility Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
analysis Revert "compiler: inline components that are used only once" (#7697) 2025-02-21 19:11:11 +01:00
basic diagnostic: try to detect use of range expression and recommand to use number 2025-04-19 22:47:45 +02:00
callbacks Fix error messages with invalid change callback 2024-06-28 10:45:45 +02:00
elements Introduce MenuSeparator 2025-04-02 11:50:45 +02:00
exports Add export { ... } from "....slint"; syntax. (#5533) 2024-07-03 12:50:40 +02:00
expressions compiler: Reject comparison on unsupported types 2025-05-07 11:39:27 +02:00
focus Refactoring: get rid in the callable in the Expression tree 2025-01-24 20:26:35 +01:00
functions Refactoring: get rid in the callable in the Expression tree 2025-01-24 20:26:35 +01:00
fuzzing Refactoring: get rid in the callable in the Expression tree 2025-01-24 20:26:35 +01:00
imports Allow trailing comma in import statements (#8223) 2025-04-21 17:24:18 +02:00
layout Compiler: Change a new error from 1.9 to a warning 2024-12-06 23:04:26 +01:00
lookup Introduce Platform.style-name 2025-05-06 13:06:27 +02:00
new_syntax Fix panic in legacy component with out property 2024-12-16 13:58:56 +01:00
parse_error Improve a bit the error when the base of an element is missing 2025-01-06 10:47:05 +01:00