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

Fix Box<dyn Reflect> struct with a hashmap in it panicking when clone_value is called on it #8184

Merged
merged 9 commits into from
Apr 22, 2023

Conversation

NoahShomette
Copy link
Contributor

@NoahShomette NoahShomette commented Mar 23, 2023

Objective

Solution

  • Updates the implementation of Reflect for Hashmaps to make clone_value call from_reflect on the key before inserting it into the new struct

@MrGVSV MrGVSV added C-Bug An unexpected or incorrect behavior A-Reflection Runtime information about types labels Mar 23, 2023
@MrGVSV MrGVSV self-requested a review March 23, 2023 23:21
Copy link
Member

@MrGVSV MrGVSV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Hopefully, with something like #6971 we can start working on ways to remove these kinds of unexpected footguns.

@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Apr 22, 2023
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Apr 22, 2023
Merged via the queue into bevyengine:main with commit a9f766c Apr 22, 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-Bug An unexpected or incorrect behavior S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

Box<dyn Reflect> struct with a hashmap in it panics when clone_value is called on it
3 participants