From b74b8d7a587a95ec7da6ce64573157be362951e7 Mon Sep 17 00:00:00 2001 From: Matthew Brown Date: Thu, 6 Apr 2017 22:38:12 -0400 Subject: [PATCH] Prevent reconciling to empty --- src/Psalm/Checker/TypeChecker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Psalm/Checker/TypeChecker.php b/src/Psalm/Checker/TypeChecker.php index 5953662b2..d14c173cb 100644 --- a/src/Psalm/Checker/TypeChecker.php +++ b/src/Psalm/Checker/TypeChecker.php @@ -167,7 +167,7 @@ class TypeChecker return Type::getMixed(); } - if ($new_var_type[0] !== '!') { + if ($new_var_type[0] !== '!' && $new_var_type !== 'empty') { if ($new_var_type[0] === '^') { $new_var_type = substr($new_var_type, 1); }