mirror of
https://github.com/danog/psalm.git
synced 2024-12-02 17:52:45 +01:00
Fix list templates
This commit is contained in:
parent
2b9512ef50
commit
0542b0e7f0
@ -808,6 +808,7 @@ class TemplateStandinTypeReplacer
|
||||
return array_values($generic_param->getAtomicTypes());
|
||||
}
|
||||
|
||||
$generic_param->possibly_undefined = false;
|
||||
$generic_param = $generic_param->setFromDocblock()->freeze();
|
||||
|
||||
if (isset(
|
||||
|
@ -486,6 +486,14 @@ class TKeyedArray extends Atomic
|
||||
$fallback_params = $this->fallback_params;
|
||||
|
||||
foreach ($fallback_params ?? [] as $offset => $property) {
|
||||
$input_type_param = null;
|
||||
|
||||
if ($input_type instanceof TKeyedArray
|
||||
&& isset($input_type->fallback_params[$offset])
|
||||
) {
|
||||
$input_type_param = $input_type->fallback_params[$offset];
|
||||
}
|
||||
|
||||
$fallback_params[$offset] = TemplateStandinTypeReplacer::replace(
|
||||
$property,
|
||||
$template_result,
|
||||
|
Loading…
Reference in New Issue
Block a user