mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Prevent removing null from single null type
This commit is contained in:
parent
c356c452ec
commit
442c307b30
@ -1010,7 +1010,7 @@ class Union
|
||||
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');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user