diff --git a/psalm.xml.dist b/psalm.xml.dist index 5c32350bc..a7d5fd4ac 100644 --- a/psalm.xml.dist +++ b/psalm.xml.dist @@ -67,9 +67,6 @@ - - - diff --git a/src/Psalm/Internal/Codebase/ClassLikes.php b/src/Psalm/Internal/Codebase/ClassLikes.php index 65711a33c..1cc52f76e 100644 --- a/src/Psalm/Internal/Codebase/ClassLikes.php +++ b/src/Psalm/Internal/Codebase/ClassLikes.php @@ -1706,12 +1706,13 @@ class ClassLikes && !$classlike_storage->is_interface ) { foreach ($method_storage->params as $offset => $param_storage) { - if (!$this->file_reference_provider->isMethodParamUsed( - strtolower((string) $method_id), - $offset - ) + if (empty($classlike_storage->overridden_method_ids[$method_name]) && $param_storage->location && !$param_storage->promoted_property + && !$this->file_reference_provider->isMethodParamUsed( + strtolower((string) $method_id), + $offset + ) ) { if ($method_storage->final) { if (IssueBuffer::accepts(