diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs index 44c15d268f23c1..e354e77beb9cc6 100644 --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -807,6 +807,18 @@ mod tests { let clone = value.reflect_clone().expect("should reflect_clone struct"); assert_eq!(value, clone.take::().unwrap()); + // Generic Struct + #[derive(Reflect, Debug, PartialEq)] + struct Bar(T, #[reflect(ignore, clone)] PhantomData); + #[derive(TypePath, Debug, PartialEq)] + struct Baz; + + let value = Bar::(123, PhantomData); + let clone = value + .reflect_clone() + .expect("should reflect_clone generic struct"); + assert_eq!(value, clone.take::>().unwrap()); + // Tuple let foo = (123, 4.56); let clone = foo.reflect_clone().expect("should reflect_clone tuple");