mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Fix re-added function storage removal
This commit is contained in:
parent
b693b726c7
commit
738ce4f850
@ -1571,7 +1571,10 @@ class ReflectorVisitor extends PhpParser\NodeVisitorAbstract implements PhpParse
|
|||||||
if ($duplicate_function_storage->location
|
if ($duplicate_function_storage->location
|
||||||
&& $duplicate_function_storage->location->getLineNumber() === $stmt->getLine()
|
&& $duplicate_function_storage->location->getLineNumber() === $stmt->getLine()
|
||||||
) {
|
) {
|
||||||
return $this->file_storage->functions[$function_id];
|
$storage = $this->file_storage->functions[$function_id];
|
||||||
|
$this->functionlike_storages[] = $storage;
|
||||||
|
|
||||||
|
return $storage;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IssueBuffer::accepts(
|
if (IssueBuffer::accepts(
|
||||||
@ -1590,8 +1593,13 @@ class ReflectorVisitor extends PhpParser\NodeVisitorAbstract implements PhpParse
|
|||||||
|
|
||||||
$duplicate_function_storage->has_visitor_issues = true;
|
$duplicate_function_storage->has_visitor_issues = true;
|
||||||
|
|
||||||
return $this->file_storage->functions[$function_id];
|
$storage = $this->file_storage->functions[$function_id];
|
||||||
} elseif (isset($this->config->getPredefinedFunctions()[$function_id])) {
|
$this->functionlike_storages[] = $storage;
|
||||||
|
|
||||||
|
return $storage;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($this->config->getPredefinedFunctions()[$function_id])) {
|
||||||
/** @psalm-suppress TypeCoercion */
|
/** @psalm-suppress TypeCoercion */
|
||||||
$reflection_function = new \ReflectionFunction($function_id);
|
$reflection_function = new \ReflectionFunction($function_id);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user