Skip to content

Commit d1f0286

Browse files
committed
Add nested generics to remote type test
1 parent e5925fd commit d1f0286

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

crates/bevy_reflect/src/lib.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,20 +1303,20 @@ bevy_reflect::tests::should_reflect_debug::Test {
13031303
#[test]
13041304
fn should_reflect_nested_remote_type() {
13051305
mod external_crate {
1306-
pub struct TheirOuter {
1307-
pub inner: TheirInner,
1306+
pub struct TheirOuter<T> {
1307+
pub inner: TheirInner<T>,
13081308
}
1309-
pub struct TheirInner(pub usize);
1309+
pub struct TheirInner<T>(pub T);
13101310
}
13111311

1312-
#[reflect_remote(external_crate::TheirOuter)]
1313-
struct MyOuter {
1314-
#[reflect(remote = "MyInner")]
1315-
pub inner: external_crate::TheirInner,
1312+
#[reflect_remote(external_crate::TheirOuter<T>)]
1313+
struct MyOuter<T: Reflect> {
1314+
#[reflect(remote = "MyInner<T>")]
1315+
pub inner: external_crate::TheirInner<T>,
13161316
}
13171317

1318-
#[reflect_remote(external_crate::TheirInner)]
1319-
struct MyInner(usize);
1318+
#[reflect_remote(external_crate::TheirInner<T>)]
1319+
struct MyInner<T: Reflect>(pub T);
13201320

13211321
let mut patch = DynamicStruct::default();
13221322
patch.set_name("MyOuter".to_string());

0 commit comments

Comments
 (0)