Hey Eugene,
On Sat, Nov 7, 2020 at 4:13 PM Eugene Sidelnyk <[email protected]> wrote:
> ```php
> function foo(A & B & E $object) {
> // some work
>
> var_dump($object);
> }
> ```
>
Fully support this for parameter, property and return types: already making
good use of intersection types since a few years.
As for when to allow them: as others have suggested in this thread, keep it
simple for now, and only allow intersection of class/interface references.
If you want to raise an RFC, special care has to be taken for the variance
in inheritance semantics.
Greets,
Marco Pivetta
http://twitter.com/Ocramius
http://ocramius.github.com/