Skip to content

Always false error does not mention subtracted type causing misleading error messages #10421

@janedbal

Description

@janedbal

Bug report

See snippet, it says Strict comparison using === between mixed and null will always evaluate to false. (which is nonsense)

Code snippet that reproduces the problem

https://phpstan.org/r/28b35ed4-f3d5-427b-83b8-44599bc42f15

Expected output

The error message should be sth like Strict comparison using === between mixed~null and null will always evaluate to false.

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

No response

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy