Skip to content

Fix JustNullableTypeTrait.equals()#335

Merged
ondrejmirtes merged 1 commit intophpstan:masterfrom
jlherren:fix-infinite-analysis
Oct 9, 2020
Merged

Fix JustNullableTypeTrait.equals()#335
ondrejmirtes merged 1 commit intophpstan:masterfrom
jlherren:fix-infinite-analysis

Conversation

@jlherren
Copy link
Copy Markdown
Contributor

@jlherren jlherren commented Oct 9, 2020

equals() wrongly returned false for two instances of ClassStringType. This
lead to an exponential explosion of very large UnionType objects with all
identical types inside.

Fixes phpstan/phpstan#3866

equals() wrongly returned false for two instances of ClassStringType.  This
lead to an exponential explosion of very large UnionType objects with all
identical types inside.

Fixes phpstan#3866
@jlherren
Copy link
Copy Markdown
Contributor Author

jlherren commented Oct 9, 2020

I hope the self-compare tests make sense like this.

@ondrejmirtes
Copy link
Copy Markdown
Member

Thank you, perfect!

@ondrejmirtes ondrejmirtes merged commit 8925195 into phpstan:master Oct 9, 2020
@jlherren jlherren deleted the fix-infinite-analysis branch October 14, 2020 09:29
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.

Infinite loop

2 participants