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

PossiblyUnusedReturnValue false-positive with throw #5975

Closed
enumag opened this issue Jun 22, 2021 · 1 comment · Fixed by #5989
Closed

PossiblyUnusedReturnValue false-positive with throw #5975

enumag opened this issue Jun 22, 2021 · 1 comment · Fixed by #5989
Assignees

Comments

@enumag
Copy link
Contributor

enumag commented Jun 22, 2021

https://psalm.dev/r/844d55abf9

@psalm-github-bot
Copy link

I found these snippets:

https://psalm.dev/r/844d55abf9
<?php

class A {
    public function foo() : Exception {
        return new Exception;
    }
}
throw (new A)->foo();
Psalm output (using commit 6d4d166):

ERROR: PossiblyUnusedReturnValue - 4:29 - The return value for this method is never used

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

Successfully merging a pull request may close this issue.

2 participants