1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Return earlier

This commit is contained in:
Matt Brown 2020-12-05 10:25:34 -05:00 committed by Daniil Gentili
parent ad87d1bacc
commit 4f9449b742
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -1214,8 +1214,14 @@ class ArgumentsAnalyzer
$class_generic_params
);
if ($template_types) {
if ($class_template_result) {
if (!$template_types) {
return null;
}
if (!$class_template_result) {
return new TemplateResult($template_types, []);
}
$template_result = $class_template_result;
if (!$template_result->template_types) {
@ -1275,12 +1281,6 @@ class ArgumentsAnalyzer
}
return $template_result;
} else {
return new TemplateResult($template_types, []);
}
}
return null;
}
/**