Skip to content

Unified: Resolve Self in static name binding - #22548

Merged
hvitved merged 4 commits into
github:mainfrom
hvitved:unified/implicit-self
Sep 14, 2026
Merged

Unified: Resolve Self in static name binding#22548
hvitved merged 4 commits into
github:mainfrom
hvitved:unified/implicit-self

Conversation

@hvitved

@hvitved hvitved commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

DCA confirms a small improvement in number of resolved names.

@hvitved
hvitved force-pushed the unified/implicit-self branch from 2dfc953 to f86e1a4 Compare September 11, 2026 12:14
@hvitved hvitved changed the title Unified: Handle self/Self Unified: Resolve Self in static name binding Sep 11, 2026
@hvitved hvitved added the no-change-note-required This PR does not need a change note label Sep 11, 2026
@hvitved
hvitved force-pushed the unified/implicit-self branch from f86e1a4 to 2d10f98 Compare September 11, 2026 12:15
@hvitved
hvitved requested a balanced review from Copilot September 11, 2026 12:17
@hvitved
hvitved marked this pull request as ready for review September 11, 2026 12:18
@hvitved
hvitved requested a review from a team as a code owner September 11, 2026 12:18
@hvitved
hvitved requested a review from asgerf September 11, 2026 12:18

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

🟡 Changes recommended

Qualified type extensions still cannot resolve Self because their opaque names are not connected to type declarations.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Balanced
Findings: 1 Medium severity

New issues introduced by this change (1)
Severity Finding
Medium severity unified/​ql/​lib/​codeql/​unified/​internal/​StaticNameBinding.qll — Resolve Self in qualified type extensions
What changed in this PR

Adds Swift Self resolution to unified static name binding.

Changes:

  • Adds a language-plugin hook for static self names.
  • Maps Swift Self to the enclosing type’s static namespace.
  • Adds class and inheritance tests.
File Description
StaticNameBinding.qll Adds static-self namespace binding.
NameBindingPlugin.qll Defines the plugin extension point.
NameBindingPluginSwift.qll Configures Swift’s Self name.
explicit-instance-field-access.swift Tests direct and inherited access.

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

Comment thread unified/ql/lib/codeql/unified/internal/StaticNameBinding.qll Outdated
Comment thread unified/ql/lib/codeql/unified/internal/NameBindingPlugin.qll Outdated
Comment thread unified/ql/lib/codeql/unified/internal/StaticNameBinding.qll Outdated
@hvitved
hvitved requested a review from asgerf September 11, 2026 14:29

@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.

👍

@hvitved
hvitved merged commit fc530c8 into github:main Sep 14, 2026
14 checks passed
@hvitved
hvitved deleted the unified/implicit-self branch September 14, 2026 09:55
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