Skip to content

Parse nested unions inside generic types#270

Draft
sirreal wants to merge 1 commit into
masterfrom
agent/fix-nested-union-generics
Draft

Parse nested unions inside generic types#270
sirreal wants to merge 1 commit into
masterfrom
agent/fix-nested-union-generics

Conversation

@sirreal

@sirreal sirreal commented Jul 24, 2026

Copy link
Copy Markdown
Member

What changed

Why

The pinned ReflectionDocBlock collection splits every pipe character before it understands generic nesting. That corrupts list<string|MessagePart|array> into separate top-level types and applies namespace expansion to the fragments.

Testing

  • focused Export_Docblocks regression: 1 test, 2 assertions
  • npm test: 23 tests, 127 assertions

Fixes #268.

Theme rendering remains tracked separately in WordPress/wporg-developer#573.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nested union types inside generics are split incorrectly

1 participant