diff --git a/src/Psalm/Internal/Type/UnionTemplateHandler.php b/src/Psalm/Internal/Type/UnionTemplateHandler.php index 160b116ae..f8a303053 100644 --- a/src/Psalm/Internal/Type/UnionTemplateHandler.php +++ b/src/Psalm/Internal/Type/UnionTemplateHandler.php @@ -704,8 +704,6 @@ class UnionTemplateHandler } if (isset($template_result->lower_bounds[$param_name_key][$atomic_type->defining_class][0])) { - $intersection_type = null; - if (!UnionTypeComparator::isContainedBy( $codebase, $template_result->lower_bounds[$param_name_key][$atomic_type->defining_class][0],