mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 12:55:26 +01:00
Don’t inherit parameter covariance
This commit is contained in:
parent
797a059a84
commit
c3d8315ab9
@ -489,13 +489,6 @@ class Populator
|
||||
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 @@ class Populator
|
||||
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 @@ class Populator
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user