From 093d9b28212d949e570a73cafbc96b93b4f7f1d8 Mon Sep 17 00:00:00 2001 From: orklah Date: Sun, 13 Feb 2022 19:44:12 +0100 Subject: [PATCH] allow use of an empty reconciliation if the type is from docblock --- src/Psalm/Internal/Type/NegatedAssertionReconciler.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Psalm/Internal/Type/NegatedAssertionReconciler.php b/src/Psalm/Internal/Type/NegatedAssertionReconciler.php index 74f4d1cf7..efdf02d80 100644 --- a/src/Psalm/Internal/Type/NegatedAssertionReconciler.php +++ b/src/Psalm/Internal/Type/NegatedAssertionReconciler.php @@ -298,7 +298,9 @@ class NegatedAssertionReconciler extends Reconciler $failed_reconciliation = Reconciler::RECONCILIATION_EMPTY; - return Type::getNever(); + return $existing_var_type->from_docblock + ? Type::getMixed() + : Type::getNever(); } return $existing_var_type;