Skip to content

Various type-related fixes#341

Merged
ondrejmirtes merged 3 commits intophpstan:masterfrom
jlherren:type-fixes
Oct 14, 2020
Merged

Various type-related fixes#341
ondrejmirtes merged 3 commits intophpstan:masterfrom
jlherren:type-fixes

Conversation

@jlherren
Copy link
Contributor

No description provided.

@ondrejmirtes
Copy link
Member

Thank you, I love it! Do those bugs have already existing GitHub issues or are these new ones?

@jlherren
Copy link
Contributor Author

I was trying to fix some GitHub issues when I found that I don't entirely understand the fine details of TypeSpecifier and the Type class hierarchy. To study it I ended up writing a fuzz test, where it would randomly choose types A and B and test invariants on them. For example intersect(A, B) should always be the same as remove(A, remove(mixed, B)). And then it started failing for some type combinations :)

I can make a PR for that fuzz test later on.

@ondrejmirtes
Copy link
Member

I’d really like these fuzz tests in the test suite, thank you 😊

@ondrejmirtes ondrejmirtes merged commit 8c13aea into phpstan:master Oct 14, 2020
@jlherren jlherren deleted the type-fixes branch October 14, 2020 09:28
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.

2 participants