Array shape not narrowing down · phpstan/phpstan · Discussion #8723

Wanted to raise here to double check I'm not doing something wrong or missing something, before I raise a bug ticket.

Example of my issue here (https://phpstan.org/r/48e0a861-751d-4053-b8f5-34f5bcc78921, it's a minimal example so I know the shapes don't really make sense). So the array can either be 2 shapes, NumberFilterStructure or CombinedNumberFilterStructure.

Since I'm doing an isset for operator which only exists in CombinedNumberFilterStructure, I would expect PHPStan to narrow down the type for line 21 to NumberFilterStructure. Instead it's not and is throwing an error saying Offset 'type' does not exist on array{operator: 'AND'|'OR'}|array{type: 'blank'|'equals'|'greaterThan'|'greaterThanOrEqual'|'inRange'|'lessThan'|'lessThanOrEqual'|'notBlank'|'notEqual'}..

Is this a bug? Or is there a different way I could get PHPStan to narrow it down.

Thanks!