slint/internal/compiler/tests/syntax/expressions
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
..
arithmetic_op.slint Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
clamp.slint Refactoring: get rid in the callable in the Expression tree 2025-01-24 20:26:35 +01:00
comparison_operator.slint Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
comparison_operator2.slint compiler: Reject comparison on unsupported types 2025-05-07 11:39:27 +02:00
condition_operator.slint Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
image-url.slint Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
image-url2.slint Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
math-macro.slint Refactoring: get rid in the callable in the Expression tree 2025-01-24 20:26:35 +01:00
minmax.slint Fix min/max/clamp in presence of percentages 2024-12-16 18:44:55 +01:00
percent2.slint Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
strings.slint Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00
unary_op.slint Simplify commercial license (#3063) 2024-05-31 14:06:17 +02:00