1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

Be explicit about use vars in closure

This commit is contained in:
Matthew Brown 2016-01-08 18:31:31 -05:00
parent 18f47f00dd
commit 7e65e13d69

View File

@ -8,10 +8,11 @@ class ClosureChecker extends FunctionChecker
{
public function check()
{
$use_vars = [];
foreach ($this->_function->uses as $use) {
$this->_declared_variables[$use->var] = 1;
$use_vars[$use->var] = true;
}
parent::check();
parent::check($use_vars);
}
}