phpstan / phpstan-doctrine

Doctrine extensions for PHPStan
MIT License
588 stars 96 forks source link

Fix wrong coalesce type inference #583

Closed janedbal closed 3 months ago

janedbal commented 3 months ago

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.

ondrejmirtes commented 3 months ago

Thank you.