1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Prevent reconciling to empty

This commit is contained in:
Matthew Brown 2017-04-06 22:38:12 -04:00
parent 20b0460a33
commit b74b8d7a58

View File

@ -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);
}