Skip to content

Mixed is assignable to any generic type #11935

Description

@klimick

Bug report

In the process of studying PHPStan, I discovered that mixed can be passed to any generic type.

Code snippet that reproduces the problem

https://phpstan.org/r/45528d36-48b9-47f0-a6b4-7162139201df

Expected output

Parameter #1 of callable callable(A): A expects A, mixed given.

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

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions