diff --git a/src/Psalm/Internal/Type/UnionTemplateHandler.php b/src/Psalm/Internal/Type/UnionTemplateHandler.php index 17d36b451..c6d632bd4 100644 --- a/src/Psalm/Internal/Type/UnionTemplateHandler.php +++ b/src/Psalm/Internal/Type/UnionTemplateHandler.php @@ -56,6 +56,7 @@ class UnionTemplateHandler $new_union_type = new Union($atomic_types); $new_union_type->ignore_nullable_issues = $union_type->ignore_nullable_issues; $new_union_type->ignore_falsable_issues = $union_type->ignore_falsable_issues; + $new_union_type->possibly_undefined = $union_type->possibly_undefined; return $new_union_type; }