mirror of
https://github.com/danog/psalm.git
synced 2024-12-04 10:38:49 +01:00
bugfix: only override templated values in case of literals
This will avoid issues with invalid intersection assertions. Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
This commit is contained in:
parent
40971ff57d
commit
7c85e0c0d9
@ -763,7 +763,7 @@ class CallAnalyzer
|
||||
$codebase
|
||||
);
|
||||
|
||||
if (!$union->hasMixed()) {
|
||||
if ($union->isSingle() || $union->allLiterals()) {
|
||||
foreach ($union->getAtomicTypes() as $atomic_type) {
|
||||
if ($assertion_type instanceof TTemplateParam
|
||||
&& $assertion_type->as->getId() === $atomic_type->getId()
|
||||
|
Loading…
Reference in New Issue
Block a user