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

[Bug] Union of empty-array and false is false #9827

Closed
ygottschalk opened this issue May 26, 2023 · 2 comments · Fixed by #9903
Closed

[Bug] Union of empty-array and false is false #9827

ygottschalk opened this issue May 26, 2023 · 2 comments · Fixed by #9903

Comments

@ygottschalk
Copy link
Contributor

https://psalm.dev/r/101d23c155

@psalm-github-bot
Copy link

I found these snippets:

https://psalm.dev/r/101d23c155
<?php

/**
 * @var array<never>|false
 */
$_data = ["some text", 5];

/** @psalm-trace $_data */
Psalm output (using commit b99857c):

INFO: Trace - 8:27 - $_data: false

@orklah
Copy link
Collaborator

orklah commented May 26, 2023

It seems to be caused by this line: https://github.com/vimeo/psalm/blob/master/src/Psalm/Internal/Type/TypeCombiner.php#L133
I have no idea why this would be there, maybe try removing it?

ygottschalk added a commit to ygottschalk/psalm that referenced this issue Jun 12, 2023
This was referenced Jun 12, 2023
orklah added a commit that referenced this issue Jun 15, 2023
robchett pushed a commit to robchett/psalm that referenced this issue Jun 18, 2023
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.

2 participants