Skip to content

Commit

Permalink
Fix #4558 - Don’t convert value-of to key-of template
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Nov 15, 2020
1 parent 26b4cd1 commit 5b004a1
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/Psalm/Internal/Type/TypeParser.php
Expand Up @@ -324,16 +324,6 @@ public static function getTypeFromTree(
if ($generic_type_value === 'value-of') {
$param_name = (string) $generic_params[0];

if (isset($template_type_map[$param_name])) {
$defining_class = array_keys($template_type_map[$param_name])[0];

return new Atomic\TTemplateKeyOf(
$param_name,
$defining_class,
$template_type_map[$param_name][$defining_class][0]
);
}

$param_union_types = array_values($generic_params[0]->getAtomicTypes());

if (count($param_union_types) > 1) {
Expand Down

0 comments on commit 5b004a1

Please sign in to comment.