Skip to content

Commit 2231492

Browse files
committed
Angle bracket annotated types to support generics (#1919)
Fixes #1873. Types should be enclosed in angular brackets to avoid ambiquity and to correctly resolve associated functions.
1 parent 490a957 commit 2231492

File tree

1 file changed

+2
-2
lines changed
  • crates/bevy_ecs/macros/src

1 file changed

+2
-2
lines changed

crates/bevy_ecs/macros/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,13 @@ pub fn derive_bundle(input: TokenStream) -> TokenStream {
118118
{
119119
if *is_bundle {
120120
field_type_infos.push(quote! {
121-
type_info.extend(#field_type::type_info());
121+
type_info.extend(<#field_type as #ecs_path::bundle::Bundle>::type_info());
122122
});
123123
field_get_components.push(quote! {
124124
self.#field.get_components(&mut func);
125125
});
126126
field_from_components.push(quote! {
127-
#field: #field_type::from_components(&mut func),
127+
#field: <#field_type as #ecs_path::bundle::Bundle>::from_components(&mut func),
128128
});
129129
} else {
130130
field_type_infos.push(quote! {

0 commit comments

Comments
 (0)