mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
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.
This commit is contained in:
parent
490a957542
commit
22314923d9
1 changed files with 2 additions and 2 deletions
|
@ -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! {
|
||||
|
|
Loading…
Reference in a new issue