1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-04 18:48:03 +01:00

fix isAlwaysTruthy: TNonEmptyString can be falsy (with '0')

This commit is contained in:
orklah 2021-10-04 23:02:01 +02:00
parent 213644d48e
commit 20bb5f196b

View File

@ -1045,11 +1045,11 @@ class Union implements TypeNode
continue;
}
if ($atomic_type instanceof Type\Atomic\TNonEmptyString) {
if ($atomic_type instanceof Type\Atomic\TNonFalsyString) {
continue;
}
if ($atomic_type instanceof Type\Atomic\TNonEmptyNonspecificLiteralString) {
if ($atomic_type instanceof Type\Atomic\TCallableString) {
continue;
}