Skip to content

Resolve arrow function parameter and return types - #4

Merged
TomasVotruba merged 1 commit into
mainfrom
resolve-arrow-function-types
Sep 14, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
resolve-arrow-function-types

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

NamespaceResolver already resolves the type names of closures, functions and methods, but arrow functions were skipped. A typed arrow function like fn (Foo $x): Bar => ... left Foo and Bar unresolved in ResolvedNames.

This adds an ExprArrowFunction handler that resolves its parameter and return types, mirroring the existing ExprClosure handler. Covered by a new test.

NamespaceResolver already resolves the type names of closures, functions
and methods, but arrow functions were skipped. A typed arrow function like
`fn (Foo $x): Bar => ...` left `Foo` and `Bar` unresolved. Add an
ExprArrowFunction handler mirroring ExprClosure.
@TomasVotruba
TomasVotruba merged commit ef8c7cb into main Sep 14, 2026
5 checks passed
@TomasVotruba
TomasVotruba deleted the resolve-arrow-function-types branch September 14, 2026 17:10
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