I would expect the following to work: https://psalm.dev/r/0d2844a23d Is this a supported use case?