mirror of
https://github.com/danog/psalm.git
synced 2024-12-04 18:48:03 +01:00
Merge pull request #6306 from orklah/misc6
Change > assertion back to @ and put back a perf threshold
This commit is contained in:
commit
1a7a44a602
@ -456,6 +456,10 @@ class Algebra
|
||||
array $right_clauses,
|
||||
int $conditional_object_id
|
||||
): array {
|
||||
if (count($left_clauses) > 60000 || count($right_clauses) > 60000) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$clauses = [];
|
||||
|
||||
$all_wedges = true;
|
||||
|
@ -93,7 +93,7 @@ class AssertionFinder
|
||||
|
||||
if ($var_name) {
|
||||
if ($candidate_if_types) {
|
||||
$if_types[$var_name] = [['>' . \json_encode($candidate_if_types[0])]];
|
||||
$if_types[$var_name] = [['@' . \json_encode($candidate_if_types[0])]];
|
||||
} else {
|
||||
$if_types[$var_name] = [['!falsy']];
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ class AssertionReconciler extends \Psalm\Type\Reconciler
|
||||
|
||||
$original_assertion = $assertion;
|
||||
|
||||
if ($assertion[0] === '>') {
|
||||
if ($assertion[0] === '@') {
|
||||
$assertion = 'falsy';
|
||||
$is_negation = true;
|
||||
}
|
||||
|
@ -162,9 +162,9 @@ class Reconciler
|
||||
$orred_type = null;
|
||||
|
||||
foreach ($new_type_part_parts as $new_type_part_part) {
|
||||
if ($new_type_part_part[0] === '>'
|
||||
if ($new_type_part_part[0] === '@'
|
||||
|| ($new_type_part_part[0] === '!'
|
||||
&& $new_type_part_part[1] === '>')
|
||||
&& $new_type_part_part[1] === '@')
|
||||
) {
|
||||
if ($new_type_part_part[0] === '!') {
|
||||
$nested_negated = !$negated;
|
||||
|
Loading…
Reference in New Issue
Block a user