mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Fix #2727 - callable arg checks should obey ignore_falsable_return
This commit is contained in:
parent
3d6c63bc08
commit
66227f9b7f
@ -2386,8 +2386,8 @@ class CallAnalyzer
|
||||
$codebase,
|
||||
$input_type,
|
||||
$closure_param_type,
|
||||
false,
|
||||
false,
|
||||
$input_type->ignore_nullable_issues,
|
||||
$input_type->ignore_falsable_issues,
|
||||
$union_comparison_results
|
||||
);
|
||||
|
||||
|
@ -1279,6 +1279,17 @@ class ArrayFunctionCallTest extends TestCase
|
||||
'$a' => 'list<string>'
|
||||
],
|
||||
],
|
||||
'arrayMapPossiblyFalseIgnored' => [
|
||||
'<?php
|
||||
function takesString(string $string): void {}
|
||||
|
||||
$date = new DateTime();
|
||||
|
||||
$a = [$date->format("Y-m-d")];
|
||||
|
||||
takesString($a[0]);
|
||||
array_map("takesString", $a);',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user