8000 Codegen: improve implementation of generated parent/child relationship by redsun82 · Pull Request #19866 · github/codeql · GitHub
[go: up one dir, main page]

Skip to content

Codegen: improve implementation of generated parent/child relationship #19866

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

redsun82
Copy link
Contributor

This improves the implementation of the generated parent/child relationship by adding a new all_children field to ql.Class which lists all children (both direct and inherited) of a class, carefully avoiding duplicating children in case of diamond inheritance. This:

  • simplifies the generated code,
  • avoids children ambiguities in case of diamond inheritance.

This only comes with some changes in the order of children in the generated tests (we were previously sorting bases alphabetically there). For the rest this should be a non-functional change.

While we currently have no diamond inheritance of child fields, we will have it shortly in Rust.

This improves the implementation of the generated parent/child
relationship by adding a new `all_children` field to `ql.Class` which
lists all children (both direct and inherited) of a class, carefully
avoiding duplicating children in case of diamond inheritance. This:
* simplifies the generated code,
* avoid children ambiguities in case of diamond inheritance.

This only comes with some changes in the order of children in the
generated tests (we were previously sorting bases alphabetically there).
For the rest this should be a non-functional change.
@github-actions github-actions bot added Rust Pull requests that update Rust code Swift labels Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rust Pull requests that update Rust code Swift
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0