Skip to content
Permalink
Browse files

Fix #2355 - don’t remove used variables

  • Loading branch information
muglug committed Nov 17, 2019
1 parent dade56e commit e76beffa784c9c622fd14378c91068d75da1218b
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Psalm/Internal/Analyzer/StatementsAnalyzer.php
@@ -1141,7 +1141,7 @@ public function checkUnreferencedVars(array $stmts)
$function_storage = $source instanceof FunctionLikeAnalyzer ? $source->getFunctionLikeStorage($this) : null;
if ($codebase->alter_code) {
// Reverse array to deal with chain of assignments
$this->unused_var_locations = array_reverse($this->unused_var_locations);
$this->unused_var_locations = array_reverse($this->unused_var_locations, true);
}
$var_list = array_column($this->unused_var_locations, 0);
$loc_list = array_column($this->unused_var_locations, 1);

0 comments on commit e76beff

Please sign in to comment.
You can’t perform that action at this time.