Skip to content

Commit

Permalink
Add nested generics to remote type test
Browse files Browse the repository at this point in the history
  • Loading branch information
MrGVSV committed Oct 17, 2022
1 parent ab0d44b commit e2383bb
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions crates/bevy_reflect/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1134,20 +1134,20 @@ bevy_reflect::tests::should_reflect_debug::Test {
#[test]
fn should_reflect_nested_remote_type() {
mod external_crate {
pub struct TheirOuter {
pub inner: TheirInner,
pub struct TheirOuter<T> {
pub inner: TheirInner<T>,
}
pub struct TheirInner(pub usize);
pub struct TheirInner<T>(pub T);
}

#[reflect_remote(external_crate::TheirOuter)]
struct MyOuter {
#[reflect(remote = "MyInner")]
pub inner: external_crate::TheirInner,
#[reflect_remote(external_crate::TheirOuter<T>)]
struct MyOuter<T: Reflect> {
#[reflect(remote = "MyInner<T>")]
pub inner: external_crate::TheirInner<T>,
}

#[reflect_remote(external_crate::TheirInner)]
struct MyInner(usize);
#[reflect_remote(external_crate::TheirInner<T>)]
struct MyInner<T: Reflect>(pub T);

let mut patch = DynamicStruct::default();
patch.set_name("MyOuter".to_string());
Expand Down

0 comments on commit e2383bb

Please sign in to comment.