Summary of a problem or a feature request
The following code:
<?php declare(strict_types = 1);
function foo(array $list)
{
foreach ($list as $part) {
switch (true) {
case isset($list['magic']):
$key = 'to-success';
break;
default:
continue 2;
}
echo $key;
}
}
Causes PhpStan to think that Variable $key might not be defined., which I see no way to be true.
It seems like there's a problem with continue 2 handling.
Code snippet that reproduces the problem
https://phpstan.org/r/db60d610-b3cf-40f3-ad51-8deb9a5c9f73
Expected output
No errors should be reported