1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00
This commit is contained in:
Daniil Gentili 2022-07-28 12:05:13 +02:00
parent 33d8f3a62d
commit 7a7a7f6bc9
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -701,7 +701,9 @@ abstract class Type
&& ($int_intersection->min_bound !== null || $int_intersection->max_bound !== null)
) {
$intersection_performed = true;
if ($int_intersection->min_bound !== null && $int_intersection->min_bound === $int_intersection->max_bound) {
if ($int_intersection->min_bound !== null
&& $int_intersection->min_bound === $int_intersection->max_bound
) {
return new TLiteralInt($int_intersection->min_bound);
}
return $int_intersection;