Sometimes you need to hint a tuple before destructuring it. I seems that currently we can achieve that only with array{0: string, 1: int} hint, which is verbose and error-prone.
I suggest introducing one of the following enhancements to resolve the issue:
array{string, int}array-tuple{string, int}list{string, int}Hey @vudaltsov, can you reproduce the issue on https://psalm.dev ?
@vudaltsov your first example already works!
Although one enhancement that could be made would be to treat array{string, int} as an explicit list, as opposed to a dictionary as it is now
Most helpful comment
Although one enhancement that could be made would be to treat
array{string, int}as an explicit list, as opposed to a dictionary as it is now