mirror of
https://github.com/slint-ui/slint.git
synced 2025-12-23 09:19:32 +00:00
parent
94ba420c01
commit
a310fdc912
2 changed files with 6 additions and 1 deletions
|
|
@ -486,7 +486,10 @@ impl Expression {
|
|||
rest.iter().position(|s| !matches!(s.1, Expression::Invalid)).unwrap_or(rest.len());
|
||||
if pos > 0 && pos < rest.len() {
|
||||
let (middle, after) = rest.split_at_mut(pos);
|
||||
let begin = &before.last().expect("The first should never be invalid").1;
|
||||
let begin = before
|
||||
.last()
|
||||
.map(|s| &s.1)
|
||||
.unwrap_or(&Expression::NumberLiteral(1., Unit::None));
|
||||
let end = &after.first().expect("The last should never be invalid").1;
|
||||
for (i, (_, e)) in middle.iter_mut().enumerate() {
|
||||
debug_assert!(matches!(e, Expression::Invalid));
|
||||
|
|
|
|||
|
|
@ -27,4 +27,6 @@ export X := Rectangle {
|
|||
|
||||
property<brush> g14: @linear-gradient(-128deg, white, blue r);
|
||||
// ^error{Unknown unqualified identifier 'r'}
|
||||
property <brush> g15: @linear-gradient(90deg, brown o, green); // #3241
|
||||
// ^error{Unknown unqualified identifier 'o'}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue