Skip to content

Fix wrong coalesce type inference - #583

Merged
ondrejmirtes merged 1 commit into
phpstan:1.4.xfrom
janedbal:coalesce-fix
Jun 25, 2024
Merged

Fix wrong coalesce type inference#583
ondrejmirtes merged 1 commit into
phpstan:1.4.xfrom
janedbal:coalesce-fix

Conversation

@janedbal

@janedbal janedbal commented Jun 25, 2024

Copy link
Copy Markdown
Contributor

Separated from #506

Coalesce is pretty nasty function:

Therefore, we cannot use the constant types if we do not know the casting logic as it results in wrong types deduced.

Comment thread src/Type/Doctrine/Query/QueryResultTypeWalker.php Outdated
@ondrejmirtes
ondrejmirtes merged commit 3d10eab into phpstan:1.4.x Jun 25, 2024
@ondrejmirtes

Copy link
Copy Markdown
Member

Thank you.

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