vimeo/psalm
array_walk_recursive changes variable type to incorrect
Aperta
#5767 aperta il 14 mag 2021
good first issuetype providers
Metriche repository
- Star
- (5369 stelle)
- Metriche merge PR
- (Metriche PR in attesa)
Descrizione
I have an array array<int, array<int, int>>, that I pass to array_walk_recursive.
The first parameter in the callback function int &$id I take by reference, then I change the value to a different type. (e.g.: string)
Though I define the @param-out string $id annotation, the inferred type is not what it expected.
Expected: array<int, array<int, string>>
Inferred: array<array-key, mixed>