Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash on first class callable as conditional do while #12246

Open
samsonasik opened this issue Dec 11, 2024 · 0 comments · May be fixed by phpstan/phpstan-src#3752
Open

crash on first class callable as conditional do while #12246

samsonasik opened this issue Dec 11, 2024 · 0 comments · May be fixed by phpstan/phpstan-src#3752

Comments

@samsonasik
Copy link

Bug report

given code:

final class SkipFirstClassCallableInDo
{
    public function getSubscribedEvents()
    {
        do {

        } while ($this->textElement(...));
    }

    public function textElement()
    {
         return 1;
    }
}

it cause crash:

Call to undefined method PHPStan\Node\Printer\Printer::pPHPStan_Node_MethodCallableNode()

Code snippet that reproduces the problem

https://phpstan.org/r/178ac73a-e99c-4961-957f-a3c6062d7c44

Expected output

it should not crash.

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

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant