1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Fixup!!! don't allow checks on literals

This commit is contained in:
orklah 2022-01-05 12:21:50 +01:00
parent 5c0fc46734
commit 83a02d9a61

View File

@ -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'