Skip to content
Permalink
Browse files

Prevent removing null from single null type

  • Loading branch information...
muglug committed May 27, 2019
1 parent c356c45 commit 442c307b301d761285e21382be67674e428eb48e
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/Psalm/Type/Union.php
@@ -1010,7 +1010,7 @@ public function replaceTemplateTypesWithStandins(
if ($input_type) {
$generic_param = clone $input_type;
if ($this->isNullable() && $generic_param->isNullable()) {
if ($this->isNullable() && $generic_param->isNullable() && !$generic_param->isNull()) {
$generic_param->removeType('null');
}

0 comments on commit 442c307

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