Skip to content

Commit

Permalink
Don’t inherit parameter covariance
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Dec 14, 2019
1 parent 797a059 commit c3d8315
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions src/Psalm/Internal/Codebase/Populator.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -489,13 +489,6 @@ private function populateDataFromParentClass(
if ($mapped_name) { if ($mapped_name) {
$storage->template_type_extends[$parent_storage->name][$mapped_name] = $type; $storage->template_type_extends[$parent_storage->name][$mapped_name] = $type;
} }

if (is_int($i)
&& ($parent_storage->template_covariants[$i] ?? false)
&& !$type->hasTemplate()
) {
$storage->template_covariants[$i] = true;
}
} }


if ($parent_storage->template_type_extends) { if ($parent_storage->template_type_extends) {
Expand Down Expand Up @@ -629,13 +622,6 @@ private function populateInterfaceDataFromParentInterfaces(
if ($mapped_name) { if ($mapped_name) {
$storage->template_type_extends[$parent_interface_storage->name][$mapped_name] = $type; $storage->template_type_extends[$parent_interface_storage->name][$mapped_name] = $type;
} }

if (is_int($i)
&& ($parent_interface_storage->template_covariants[$i] ?? false)
&& !$type->hasTemplate()
) {
$storage->template_covariants[$i] = true;
}
} }


if ($parent_interface_storage->template_type_extends) { if ($parent_interface_storage->template_type_extends) {
Expand Down Expand Up @@ -730,13 +716,6 @@ private function populateDataFromImplementedInterfaces(
if ($mapped_name) { if ($mapped_name) {
$storage->template_type_extends[$implemented_interface_storage->name][$mapped_name] = $type; $storage->template_type_extends[$implemented_interface_storage->name][$mapped_name] = $type;
} }

if (is_int($i)
&& ($implemented_interface_storage->template_covariants[$i] ?? false)
&& !$type->hasTemplate()
) {
$storage->template_covariants[$i] = true;
}
} }


if ($implemented_interface_storage->template_type_extends) { if ($implemented_interface_storage->template_type_extends) {
Expand Down

0 comments on commit c3d8315

Please sign in to comment.