Skip to content

Unpacked argument (...) cannot be followed by a non-unpacked argument. #11418

@N1ebieski

Description

@N1ebieski

Bug report

Why is this not allowed? This is an example taken from the PHP documentation (example 19 Use named arguments after unpacking):

As of PHP 8.1.0, it is possible to use named arguments after unpacking the arguments. A named argument must not override an already unpacked argument.

Code snippet that reproduces the problem

https://phpstan.org/r/673c91e9-fa99-4196-82fb-91545cc56f5c

Expected output

No error!

Did PHPStan help you today? Did it make you happy in any way?

Eehhhh.....

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions