Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot derive Reflect on a struct with Option<Box<T>> field where T: Reflect #10393

Open
umut-sahin opened this issue Nov 5, 2023 · 1 comment
Labels
A-Reflection Runtime information about types C-Usability A simple quality-of-life change that makes Bevy easier to use

Comments

@umut-sahin
Copy link
Contributor

umut-sahin commented Nov 5, 2023

Bevy version

v0.12

What you did

#[derive(Reflect)]
pub struct Foo<T: Reflect> {
    pub problem: Option<Box<T>>,
}

What went wrong

error[E0277]: the trait bound `std::boxed::Box<T>: TypePath` is not satisfied
  --> src/bug.rs:5:18
   |
25 |     pub problem: Option<Box<T>>,
   |                  ^^^^^^^^^^^^^^ the trait `TypePath` is not implemented for `std::boxed::Box<T>`
   |

Additional information

This was compiling on v0.11.

@umut-sahin umut-sahin added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Nov 5, 2023
@MrGVSV
Copy link
Member

MrGVSV commented Nov 5, 2023

Related to #9929 and #6098

@MrGVSV MrGVSV added C-Usability A simple quality-of-life change that makes Bevy easier to use A-Reflection Runtime information about types and removed C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Reflection Runtime information about types C-Usability A simple quality-of-life change that makes Bevy easier to use
Projects
Status: In Progress
Development

No branches or pull requests

2 participants