From 8dffd65a599d7fdd4a6814d3b257a80b6bc8c571 Mon Sep 17 00:00:00 2001 From: Matthew Brown Date: Mon, 4 Nov 2019 07:12:22 -0500 Subject: [PATCH] Preserve possible-undefinedness --- src/Psalm/Internal/Type/UnionTemplateHandler.php | 1 + 1 file changed, 1 insertion(+) 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; }