Skip to content

never return type should lead to error when used #11909

@staabm

Description

@staabm

Bug report

I think we are missing some errors in the given snippet

Code snippet that reproduces the problem

https://phpstan.org/r/726ae4ab-c94a-4b7c-827c-f0c80e677221

Expected output

  • error on line 7 where we echo the never-type
  • error on line 8 because its dead code after a function call with never type

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