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

Also unset possibly-in-scope vars

This commit is contained in:
Matt Brown 2017-02-08 11:27:06 -05:00
parent 09ca483e7d
commit 8cd83a581a
2 changed files with 2 additions and 1 deletions

View File

@ -610,7 +610,7 @@ class TypeChecker
new FailedTypeResolution('Cannot resolve types for ' . $key, $code_location),
$suppressed_issues
)) {
return false;
// fall through
}
}
}

View File

@ -195,6 +195,7 @@ class Context
public function remove($remove_var_id)
{
unset($this->referenced_vars[$remove_var_id]);
unset($this->vars_possibly_in_scope[$remove_var_id]);
if (isset($this->vars_in_scope[$remove_var_id])) {
$type = $this->vars_in_scope[$remove_var_id];