We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
match
Should be no error here:
https://psalm.dev/r/e6cd62e225
The text was updated successfully, but these errors were encountered:
I found these snippets:
<?php interface Foo {} class X implements Foo {} class Y implements Foo {} function accept_x_or_y(X|Y $_): int { return 1; } function test(Foo $foo): void { print match (true) { $foo instanceof X, $foo instanceof Y => accept_x_or_y($foo), default => 2, }; } test(new X); test(new Y);
Psalm output (using commit 2aaa577): ERROR: ArgumentTypeCoercion - 14:44 - Argument 1 of accept_x_or_y expects X|Y, but parent type Foo provided
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Should be no error here:
https://psalm.dev/r/e6cd62e225
The text was updated successfully, but these errors were encountered: