Thanks to visit codestin.com
Credit goes to github.com

Skip to content

PHPStan behaves differently when a type is built instead of passed #10650

@mvorisek

Description

@mvorisek

Bug report

For unknown reasons to me - when the list is passed directly - https://phpstan.org/r/547a5f78-626f-4711-927b-0ded26f1774c - the analysis is correct.

Code snippet that reproduces the problem

https://phpstan.org/r/21f54be0-e313-4a23-b2fe-245d6cfb001b

Expected output

-actual
+expected
Line	Error
19	Dumped type: list<'x'>
-27	Dumped type: list<'x'>
+27	Dumped type: array<int<0, max>, 'x'>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions