mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Fix #831 - ignore falsable issues when getting callmap function params
This commit is contained in:
parent
896790d30c
commit
4688cf7a92
@ -1016,7 +1016,13 @@ abstract class FunctionLikeChecker extends SourceChecker implements StatementsSo
|
||||
continue;
|
||||
}
|
||||
|
||||
if (TypeChecker::isContainedBy($project_checker->codebase, $arg->value->inferredType, $param_type)) {
|
||||
if (TypeChecker::isContainedBy(
|
||||
$project_checker->codebase,
|
||||
$arg->value->inferredType,
|
||||
$param_type,
|
||||
$arg->value->inferredType->ignore_nullable_issues,
|
||||
$arg->value->inferredType->ignore_falsable_issues
|
||||
)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -694,6 +694,13 @@ class FunctionCallTest extends TestCase
|
||||
'$h' => 'array<mixed, mixed>',
|
||||
],
|
||||
],
|
||||
'strstrWithPossiblyFalseFirstArg' => [
|
||||
'<?php
|
||||
strtr(
|
||||
file_get_contents("foobar.txt"),
|
||||
["foo" => "bar"]
|
||||
);'
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user