Allow derived structs to override base fields with subtypes#681
Merged
AdamGlustein merged 3 commits intomainfrom Mar 16, 2026
Merged
Allow derived structs to override base fields with subtypes#681AdamGlustein merged 3 commits intomainfrom
AdamGlustein merged 3 commits intomainfrom
Conversation
Signed-off-by: Adam Glustein <adam.glustein@point72.com>
9d51c23 to
f718205
Compare
p72dennisxu
previously approved these changes
Feb 24, 2026
robambalu
reviewed
Mar 9, 2026
…onstruction and only then adding derived fields Signed-off-by: Adam Glustein <adam.glustein@point72.com>
e5e35bf to
170bb72
Compare
robambalu
reviewed
Mar 13, 2026
…rocessing, simplifies the logic and indexing Signed-off-by: Adam Glustein <adam.glustein@point72.com>
8311bd3 to
eaf9f4b
Compare
robambalu
approved these changes
Mar 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #517 , allows for derived struct types to specialize fields iff those fields are Python objects or csp.Structs.
For example,
is allowed, but
or
are not. Note that a lot of the changes in
Struct.cppis just a reordering of when we create the set/none masks; before we did this before adding base class fields, now we do it after.