> Should we be planning ahead for some future where union and intersection 
> types can be mixed and design the reflection API accordingly?  I worry that 
> if we have a ReflectionIntersectionType, and a ReflectionUnionType, that 
> ReflectionIntersectionAndUnionType is just going to make both implementers 
> and users table-flip.

As far as I understood, there is no need for any new "combination"
`ReflectionType`-s. For e.g. "A|(B&C)". There should be a structure
like this:

```
ReflectionUnionType<A|(B&C)>#getTypes():
|-- ReflectionType<A>
|-- ReflectionIntersectionType<B&C>#getTypes():
    |-- ReflectionType<B>
    |-- ReflectionType<C>
```

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to