mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
parent
c82bb1515e
commit
47ac396bc0
2 changed files with 7 additions and 7 deletions
|
@ -1282,7 +1282,7 @@ impl Element {
|
|||
| SyntaxKind::RepeatedElement
|
||||
| SyntaxKind::ChildrenPlaceholder
|
||||
) {
|
||||
diag.push_warning("A ListView can just have a single 'for' as children. Anything else is not supported".into(), &se)
|
||||
diag.push_error("A ListView can just have a single 'for' as children. Anything else is not supported".into(), &se)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ import { ListView } from "std-widgets.slint";
|
|||
Foo := Rectangle {
|
||||
ListView {
|
||||
@children
|
||||
// ^warning{A ListView can just have a single 'for' as children. Anything else is not supported}
|
||||
// ^error{A ListView can just have a single 'for' as children. Anything else is not supported}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -14,22 +14,22 @@ export Bar := Rectangle {
|
|||
Foo { Text {} }
|
||||
ListView {
|
||||
Text {}
|
||||
// ^warning{A ListView can just have a single 'for' as children. Anything else is not supported}
|
||||
// ^error{A ListView can just have a single 'for' as children. Anything else is not supported}
|
||||
}
|
||||
ListView {
|
||||
Text { }
|
||||
// ^warning{A ListView can just have a single 'for' as children. Anything else is not supported}
|
||||
// ^error{A ListView can just have a single 'for' as children. Anything else is not supported}
|
||||
for x in 2: Rectangle {}
|
||||
Text { }
|
||||
// ^warning{A ListView can just have a single 'for' as children. Anything else is not supported}
|
||||
// ^error{A ListView can just have a single 'for' as children. Anything else is not supported}
|
||||
for x in 2: Rectangle {}
|
||||
// ^warning{A ListView can just have a single 'for' as children. Anything else is not supported}
|
||||
// ^error{A ListView can just have a single 'for' as children. Anything else is not supported}
|
||||
}
|
||||
|
||||
ListView { for x in 2: Rectangle {} }
|
||||
ListView {
|
||||
for x in 2: Rectangle {}
|
||||
for x in 2: Rectangle {}
|
||||
// ^warning{A ListView can just have a single 'for' as children. Anything else is not supported}
|
||||
// ^error{A ListView can just have a single 'for' as children. Anything else is not supported}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue