Skip to content
Permalink
Browse files

Don’t inherit parameter covariance

  • Loading branch information
muglug committed Dec 14, 2019
1 parent 797a059 commit c3d8315ab98047eaec5bf575e6250fb6def19f92
Showing with 0 additions and 21 deletions.
  1. +0 −21 src/Psalm/Internal/Codebase/Populator.php
@@ -489,13 +489,6 @@ private function populateDataFromParentClass(
if ($mapped_name) {
$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) {
@@ -629,13 +622,6 @@ private function populateInterfaceDataFromParentInterfaces(
if ($mapped_name) {
$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) {
@@ -730,13 +716,6 @@ private function populateDataFromImplementedInterfaces(
if ($mapped_name) {
$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) {

0 comments on commit c3d8315

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