Skip to content

No-Brace Short Closure not working #7

@HallofFamer

Description

@HallofFamer

It seems that short closure without braces aint working for me. This code cannot be compiled into the correct syntax in PHP:

$result = array_map($x ~> $x * 2 * ++$y, range(1, 10));

Instead it has parse error: 'syntax error, unexpected '~', expecting ',' or ')''. Apparently the issue is with expression() identifier which doesnt seem to work, its a bug with Yay library. I wonder if you have a workaround for this issue, or we may have to wait a response from marcioAlmada to fix Yay. Or if you dont have the same problem as I do, lemme know too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions