mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Fix string assertion for ternaries
This commit is contained in:
parent
f858924b60
commit
3c9e42f884
@ -55,7 +55,7 @@ class TernaryChecker
|
||||
)
|
||||
);
|
||||
|
||||
$reconcilable_if_types = Algebra::getTruthsFromFormula($ternary_clauses);
|
||||
$reconcilable_if_types = Algebra::getTruthsFromFormula($ternary_clauses, $new_referenced_var_ids);
|
||||
|
||||
$changed_var_ids = [];
|
||||
|
||||
|
@ -815,8 +815,9 @@ class TypeAlgebraTest extends TestCase
|
||||
'<?php
|
||||
$s = rand(0, 1) ? "a" : "b";
|
||||
|
||||
if (($s === "a" && rand(0, 1))
|
||||
|| ($s === "b" && rand(0, 1))) {}',
|
||||
if (($s === "a" && rand(0, 1)) || ($s === "b" && rand(0, 1))) {}
|
||||
|
||||
$a = (($s === "a" && rand(0, 1)) || ($s === "b" && rand(0, 1))) ? 1 : 0;',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user