-
Notifications
You must be signed in to change notification settings - Fork 663
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
Could not intersect two array shapes #7909
Labels
Comments
I found these snippets: https://psalm.dev/r/c2e2af5818<?php
/**
* @psalm-type GenericUserWhere = array{
* id: list<string>,
* }
*/
final class GenericUserCriteria
{
}
/**
* @psalm-import-type GenericUserWhere from GenericUserCriteria
*
* @psalm-type NonGenericUserWhere = GenericUserWhere & array{
* otherId: list<string>,
* }
*/
final class NonGenericUserCriteria
{
}
|
May be intersection doesn't work only with psalm-alias. |
I found these snippets: https://psalm.dev/r/3af7cbf3d7<?php
/**
* @param array{id: list<string>} & array{otherId: list<string>} $_
*/
function test(array $_): void {}
test([]);
|
Yeah, we're missing something to support that. I believe we already have an issue for this |
Duplicate of #5148. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://psalm.dev/r/c2e2af5818
The text was updated successfully, but these errors were encountered: