mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 12:24:49 +01:00
Be explicit about use vars in closure
This commit is contained in:
parent
18f47f00dd
commit
7e65e13d69
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user