Skip to content

Do not resolve null, false, true, mixed and never type names against the namespace - #40

Merged
TomasVotruba merged 1 commit into
mainfrom
resolve-builtin-types
Nov 27, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
resolve-builtin-types

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

In namespace App; function f(): null {} the return type resolved to App\null.

  • add null, false, true, mixed and never to the built-in names Namespace::ResolveName keeps as-is (case-insensitive, like the existing ones)
  • array and callable are parsed as identifiers, so they never reach the resolver
  • tests cover param, return, property, union and nullable positions, plus classes like App\Nullable that still resolve

@TomasVotruba
TomasVotruba merged commit a97d029 into main Nov 27, 2026
5 checks passed
@TomasVotruba
TomasVotruba deleted the resolve-builtin-types branch November 27, 2026 09:12
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