From 2df1f9d42e3aec6a926dd56f692df74f3b43f0da Mon Sep 17 00:00:00 2001 From: orklah Date: Wed, 22 Sep 2021 22:08:32 +0200 Subject: [PATCH] add resource to truthy types --- src/Psalm/Type/Union.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Psalm/Type/Union.php b/src/Psalm/Type/Union.php index 5ca5dca51..10b0e884b 100644 --- a/src/Psalm/Type/Union.php +++ b/src/Psalm/Type/Union.php @@ -1069,6 +1069,10 @@ class Union implements TypeNode continue; } + if ($atomic_type instanceof Type\Atomic\TResource) { + continue; + } + if ($atomic_type instanceof Type\Atomic\TKeyedArray) { foreach ($atomic_type->properties as $property) { if ($property->possibly_undefined === false) {