Fix panic in the interpreter when using visible in a ListView

This doesn't solve the issue #2537, but at least prevent the panic

Drive by change to fix compile when a struct is named `Box`
This commit is contained in:
Olivier Goffart 2023-12-12 12:47:40 +01:00
parent 8d19426723
commit 6ebfad14db
4 changed files with 76 additions and 17 deletions

View file

@ -1416,7 +1416,7 @@ fn generate_item_tree(
static ITEM_ARRAY : sp::OnceBox<
[vtable::VOffset<#inner_component_id, ItemVTable, vtable::AllowPin>; #item_array_len]
> = sp::OnceBox::new();
&*ITEM_ARRAY.get_or_init(|| Box::new([#(#item_array),*]))
&*ITEM_ARRAY.get_or_init(|| sp::Box::new([#(#item_array),*]))
}
#window_adapter_functions