mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
diagnostic: try to detect use of range expression and recommand to use number
Several users have been asking if it is possible to use range expression. Detect this and have a meaningful error message
This commit is contained in:
parent
36bc0d1922
commit
b77368f1b6
4 changed files with 51 additions and 1 deletions
|
@ -20,4 +20,8 @@ export SuperSimple := Rectangle {
|
|||
Rectangle {}
|
||||
}
|
||||
|
||||
for x in 0..32: Rectangle { }
|
||||
// ^error{Parse error. Range expressions are not supported in Slint. You can use an integer as a model to repeat something multiple time. Eg: `for i in 32 : ...`}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue