Skip to content

Commit e2383bb

Browse files
committed
Add nested generics to remote type test
1 parent ab0d44b commit e2383bb

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
@@ -1134,20 +1134,20 @@ bevy_reflect::tests::should_reflect_debug::Test {
11341134
#[test]
11351135
fn should_reflect_nested_remote_type() {
11361136
mod external_crate {
1137-
pub struct TheirOuter {
1138-
pub inner: TheirInner,
1137+
pub struct TheirOuter<T> {
1138+
pub inner: TheirInner<T>,
11391139
}
1140-
pub struct TheirInner(pub usize);
1140+
pub struct TheirInner<T>(pub T);
11411141
}
11421142

1143-
#[reflect_remote(external_crate::TheirOuter)]
1144-
struct MyOuter {
1145-
#[reflect(remote = "MyInner")]
1146-
pub inner: external_crate::TheirInner,
1143+
#[reflect_remote(external_crate::TheirOuter<T>)]
1144+
struct MyOuter<T: Reflect> {
1145+
#[reflect(remote = "MyInner<T>")]
1146+
pub inner: external_crate::TheirInner<T>,
11471147
}
11481148

1149-
#[reflect_remote(external_crate::TheirInner)]
1150-
struct MyInner(usize);
1149+
#[reflect_remote(external_crate::TheirInner<T>)]
1150+
struct MyInner<T: Reflect>(pub T);
11511151

11521152
let mut patch = DynamicStruct::default();
11531153
patch.set_name("MyOuter".to_string());

0 commit comments

Comments
 (0)