Skip to content

Unified: Handle GenericTypeExpr in static name binding - #22665

Open
hvitved wants to merge 3 commits into
github:mainfrom
hvitved:unified/static-name-binding-generic-type-expr
Open

hvitved wants to merge 3 commits into
github:mainfrom
hvitved:unified/static-name-binding-generic-type-expr

Conversation

@hvitved

@hvitved hvitved commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Extracted from #22639.

@hvitved hvitved added the no-change-note-required This PR does not need a change note label Sep 23, 2026
@hvitved
hvitved requested a balanced review from Copilot September 23, 2026 12:59

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.

Copilot review overview

🟢 Approval recommended

The focused implementation is consistent with the extracted AST shape and is covered by an appropriate regression test.

Review effort: Balanced
Findings: None

What changed in this PR

Extends unified static name binding to resolve members accessed through Swift generic type expressions.

Changes:

  • Unwraps GenericTypeExpr to its base identifier during reference resolution.
  • Adds coverage for inferred and explicitly specialized generic enum access.
File Description
unified/​ql/​lib/​codeql/​unified/​internal/​StaticNameBinding.qll Resolves generic type bases during static binding.
unified/​ql/​test/​library-tests/​static-name-binding/​generics.swift Tests generic enum and member resolution.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@hvitved
hvitved force-pushed the unified/static-name-binding-generic-type-expr branch from a95acc1 to 009d0c3 Compare September 23, 2026 13:05
@hvitved
hvitved marked this pull request as ready for review September 23, 2026 13:06
@hvitved
hvitved requested a review from a team as a code owner September 23, 2026 13:06
@hvitved
hvitved requested a review from asgerf September 23, 2026 13:06
Comment thread unified/ql/lib/codeql/unified/internal/StaticNameBinding.qll Outdated
Co-authored-by: Asger F <asgerf@github.com>
@hvitved
hvitved requested a review from asgerf September 23, 2026 13:16

This branch has not been deployed

No deployments
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants