-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Labels
Milestone
Description
Bug report
For this code reports "While loop condition is always true.". It's true, but it's not a wrong code.
function falsePositive(): Generator {
while (true) {
$item = yield;
yield $item;
}
}
$generator = falsePositive();
var_dump($generator->send('foo'));Code snippet that reproduces the problem
https://phpstan.org/r/25d4a2ba-ac56-46d1-afa0-8fe581926bad
Expected output
No error
Did PHPStan help you today? Did it make you happy in any way?
No response
Reactions are currently unavailable