diff --git a/src/Psalm/Type/Union.php b/src/Psalm/Type/Union.php index c380abd7673..e24c641307e 100644 --- a/src/Psalm/Type/Union.php +++ b/src/Psalm/Type/Union.php @@ -428,6 +428,18 @@ public function freeze(): ImmutableUnion if ($key === 'exact_id') { continue; } + if ($key === 'literal_string_types') { + continue; + } + if ($key === 'typed_class_strings') { + continue; + } + if ($key === 'literal_int_types') { + continue; + } + if ($key === 'literal_float_types') { + continue; + } $union->{$key} = $value; } return $union;