From 83a02d9a619a96beec19c8163338307a11103cd4 Mon Sep 17 00:00:00 2001 From: orklah Date: Wed, 5 Jan 2022 12:21:50 +0100 Subject: [PATCH] Fixup!!! don't allow checks on literals --- src/Psalm/Internal/Type/AssertionReconciler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Psalm/Internal/Type/AssertionReconciler.php b/src/Psalm/Internal/Type/AssertionReconciler.php index e94a041a6..97c8662a0 100644 --- a/src/Psalm/Internal/Type/AssertionReconciler.php +++ b/src/Psalm/Internal/Type/AssertionReconciler.php @@ -1361,7 +1361,7 @@ class AssertionReconciler extends Reconciler return new Union([new TLiteralString($value)]); } - if ($existing_var_atomic_type instanceof TString) { + if ($existing_var_atomic_type instanceof TString && !$existing_var_atomic_type instanceof TLiteralString) { if ($scalar_type === 'class-string' || $scalar_type === 'interface-string' || $scalar_type === 'trait-string'