Skip to content

Resolve new self/static to the enclosing class - #49

Merged
TomasVotruba merged 1 commit into
mainfrom
resolve-new-self
Nov 14, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
resolve-new-self

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member
  • new self(...) / new static(...) constructor args were recorded under the literal class "self"/"static" and never typed anything, now they map to the enclosing class FQCN
  • same for new self() as an argument value, new static()->... chains and $x = new self() locals
  • new parent(...) and self/static outside a class stay unresolved
  • self::/static:: calls were already handled, covered by existing tests

Constructor calls, new arguments, new-rooted method chains and local new assignments now map self/static to the enclosing class FQCN. new parent and self outside a class stay unresolved.
@TomasVotruba
TomasVotruba merged commit 2d79223 into main Nov 14, 2026
4 checks passed
@TomasVotruba
TomasVotruba deleted the resolve-new-self branch November 14, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant