From ac8f892d13052181cb255a83f9d1cf391e0d6253 Mon Sep 17 00:00:00 2001 From: kkmuffme <11071985+kkmuffme@users.noreply.github.com> Date: Thu, 29 Dec 2022 18:50:58 +0100 Subject: [PATCH] Fix never return union type wrong condition Fix never return union type wrong condition Related https://github.com/vimeo/psalm/pull/8624 --- src/Psalm/Type.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Psalm/Type.php b/src/Psalm/Type.php index 3fdced877..2f12dd8bb 100644 --- a/src/Psalm/Type.php +++ b/src/Psalm/Type.php @@ -643,7 +643,7 @@ abstract class Type $combined_type->ignore_falsable_issues = true; } - if ($type_1->explicit_never && $type_2->explicit_never) { + if ($type_1->explicit_never || $type_2->explicit_never) { $combined_type->explicit_never = true; }