Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Clarify fn keyword's usage as argument #55

Merged
merged 1 commit into from
Dec 8, 2022

Conversation

KorvinSzanto
Copy link
Contributor

This PR removes the "preceding space" requirement from the fn keyword used in short closures in order to allow using short closures as arguments without needing to include a preceeding space.

// Current spec:
foo( fn(int $x, int $y): int => $x + $y);

// After this PR:
foo(fn(int $x, int $y): int => $x + $y);

@theodorejb
Copy link
Contributor

Good catch. 👍

@KorvinSzanto KorvinSzanto merged commit 52a2d8e into php-fig:master Dec 8, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants