1
0
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:
Brown 2020-01-31 13:58:56 -05:00
parent 3d6c63bc08
commit 66227f9b7f
2 changed files with 13 additions and 2 deletions

View File

@ -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
);

View File

@ -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);',
],
];
}