1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

Simplify ArrayFetchAnalyzer::getArrayAccessTypeGivenOffset

Ref #4714
This commit is contained in:
Matt Brown 2020-11-27 23:36:47 -05:00
parent fc29d26879
commit 4af7e818b2
3 changed files with 1065 additions and 815 deletions

View File

@ -100,7 +100,9 @@ class IfAnalyzer
) {
if (IssueBuffer::accepts(
new ConflictingReferenceConstraint(
'There is more than one pass-by-reference constraint on ' . $var_id,
'There is more than one pass-by-reference constraint on ' . $var_id
. ' between ' . $byref_constraint->type->getId()
. ' and ' . $outer_constraint_type->getId(),
new CodeLocation($statements_analyzer, $stmt, $outer_context->include_location, true)
),
$statements_analyzer->getSuppressedIssues()

View File

@ -320,6 +320,7 @@ class LoopAnalyzer
}
$inner_context->clauses = $pre_loop_context->clauses;
$inner_context->byref_constraints = $pre_loop_context->byref_constraints;
$analyzer->setMixedCountsForFile($statements_analyzer->getFilePath(), $original_mixed_counts);
IssueBuffer::startRecording();