Skip to content

Unified: Add extensions convenience predicates - #22867

Merged
hvitved merged 3 commits into
github:mainfrom
hvitved:unified/extensions-convenience
Oct 22, 2026
Merged

hvitved merged 3 commits into
github:mainfrom
hvitved:unified/extensions-convenience

Conversation

@hvitved

@hvitved hvitved commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Adds getAMemberIncludingExtensions and getParentClass for taking extensions into account.

@hvitved
hvitved force-pushed the unified/extensions-convenience branch 2 times, most recently from 42f7686 to 1d10583 Compare October 22, 2026 08:08
@hvitved hvitved added the no-change-note-required This PR does not need a change note label Oct 22, 2026
@hvitved
hvitved marked this pull request as ready for review October 22, 2026 08:12
@hvitved
hvitved requested a review from a team as a code owner October 22, 2026 08:12
Copilot AI max review requested due to automatic review settings October 22, 2026 08:12
@hvitved
hvitved requested a review from asgerf October 22, 2026 08:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Extension ownership and type-alias resolution still produce incorrect or incomplete results.

4 open issues
What changed in this PR

This PR adds extension-aware navigation to the Unified AST library and applies it to naming, type inference, and legacy model matching.

Changes:

  • Add getAMemberIncludingExtensions() and getParentClass().
  • Centralize qualified-name handling while keeping display names independent of name binding.
  • Add local-overlay annotations and update a control-flow test expectation.
File Description
unified/​ql/​test/​library-tests/​controlflow/​basicblock-slices.expected Reflect updated enum-constructor naming.
unified/​ql/​lib/​utils/​test/​TestUtils.qll Use shared qualified names for test aliases.
unified/​ql/​lib/​codeql/​unified/​internal/​typeinference/​TypeInference.qll Infer super through semantic parent classes.
unified/​ql/​lib/​codeql/​unified/​internal/​NameBindingPluginSwift.qll Declare local-overlay support for Swift binding rules.
unified/​ql/​lib/​codeql/​unified/​internal/​NameBindingPlugin.qll Declare local-overlay support for binding hooks.
unified/​ql/​lib/​codeql/​unified/​internal/​mad/​LegacyMaD.qll Include extension methods in legacy model matching.
unified/​ql/​lib/​codeql/​unified/​internal/​FacadeAst.qll Add extension-aware navigation and separate semantic and display naming.

Review effort: Max

Comment thread unified/ql/lib/codeql/unified/internal/FacadeAst.qll Outdated
Comment thread unified/ql/lib/codeql/unified/internal/FacadeAst.qll
Comment thread unified/ql/lib/codeql/unified/internal/FacadeAst.qll Outdated
Comment thread unified/ql/lib/utils/test/TestUtils.qll
@hvitved
hvitved force-pushed the unified/extensions-convenience branch from 1d10583 to 590903d Compare October 22, 2026 08:38
Comment thread unified/ql/lib/codeql/unified/internal/FacadeAst.qll Outdated

@asgerf asgerf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One final nit then LGTM

Comment thread unified/ql/lib/codeql/unified/internal/FacadeAst.qll Outdated
@hvitved
hvitved requested a review from asgerf October 22, 2026 09:20
@hvitved
hvitved merged commit 4215c8a into github:main Oct 22, 2026
14 of 15 checks passed
@hvitved
hvitved deleted the unified/extensions-convenience branch October 22, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-change-note-required This PR does not need a change note Unified

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants