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

ImmediatelyCalledCallableThrowTypeExtension: ignore implicit throw points #163

Conversation

JanTvrdik
Copy link
Member

When Traversable type is iterated inside immediately called callable, PHPStan will add implicit throw point.

The Throwable type that comes from this implicit throw point will override all explicit throw points (because union of Throwable with any exception will resolve to Throwable).

I did not figure out how to write test for this.

@JanTvrdik JanTvrdik merged commit a566cfd into master Sep 26, 2023
12 checks passed
@JanTvrdik JanTvrdik deleted the immediately-called-callable-throwing-exception-ignore-implicit branch September 26, 2023 12:55
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 this pull request may close these issues.

None yet

1 participant