Skip to content

Commit

Permalink
Angle bracket annotated types to support generics (bevyengine#1919)
Browse files Browse the repository at this point in the history
Fixes bevyengine#1873. Types should be enclosed in angular brackets to avoid ambiquity and to correctly resolve associated functions.
  • Loading branch information
YohDeadfall authored and ostwilkens committed Jul 27, 2021
1 parent 9b2c0a9 commit 251ef82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/bevy_ecs/macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ pub fn derive_bundle(input: TokenStream) -> TokenStream {
{
if *is_bundle {
field_type_infos.push(quote! {
type_info.extend(#field_type::type_info());
type_info.extend(<#field_type as #ecs_path::bundle::Bundle>::type_info());
});
field_get_components.push(quote! {
self.#field.get_components(&mut func);
});
field_from_components.push(quote! {
#field: #field_type::from_components(&mut func),
#field: <#field_type as #ecs_path::bundle::Bundle>::from_components(&mut func),
});
} else {
field_type_infos.push(quote! {
Expand Down

0 comments on commit 251ef82

Please sign in to comment.