Skip to content

Nop node hides next unreachable statement #8966

@takaram

Description

@takaram

Bug report

When a nop node is right after exit or return, "unreachable statement" error will not be reported.

Code snippet that reproduces the problem

https://phpstan.org/r/6c7ae512-f7c8-47e1-9c68-09154c64781e

Expected output

"Unreachable statement" error on echo statement of line 8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions