🌐 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

UnhandledMatchError since 2.1.41 #14396

Description

@florianhofsaessC24

Bug report

Affected Version:

= 2.1.41

Problem:
Using a match expression, covering all possible options leads to an error, when it is used inside a foreach loop.
Running the same match expression on a single item, the error is gone.

Interstingly the error is gone, enabling "treatPhpDocTypesAsCertain"

Code snippet that reproduces the problem

https://phpstan.org/r/f6ae2fe6-cd75-4191-a7c8-96bfa4714b35

Expected output

I would expect no error to happen.

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

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions