Re: [PHP-DEV] Canonicalize "iterable" into "array|Traversable" and Reflection

2022-04-23 Thread G. P. B.
On Sat, 23 Apr 2022 at 19:19, Marco Pivetta wrote: > Hey George, > > How would the engine behave (with this RFC included) with an inheritance > check? > > Specifically: > > interface A { > function foo(interable $param): iterable; > } > interface B { > function foo(array|\Trabersable $par

Re: [PHP-DEV] Canonicalize "iterable" into "array|Traversable" and Reflection

2022-04-23 Thread Marco Pivetta
Hey George, How would the engine behave (with this RFC included) with an inheritance check? Specifically: interface A { function foo(interable $param): iterable; } interface B { function foo(array|\Trabersable $param): array|\Traversable: } Would they be compatible with each other, if p

Re: [PHP-DEV] Canonicalize "iterable" into "array|Traversable" and Reflection

2022-04-23 Thread G. P. B.
On Sat, 23 Apr 2022 at 19:06, Larry Garfield wrote: > On Sat, Apr 23, 2022, at 7:27 AM, G. P. B. wrote: > > Hello internals, > > > > One area the engine currently needs to take special care is dealing with > > the typing relation between iterable, Traversable, and array. > > The change is to cano

Re: [PHP-DEV] Canonicalize "iterable" into "array|Traversable" and Reflection

2022-04-23 Thread Larry Garfield
On Sat, Apr 23, 2022, at 7:27 AM, G. P. B. wrote: > Hello internals, > > One area the engine currently needs to take special care is dealing with > the typing relation between iterable, Traversable, and array. > The change is to canonicalize "iterable" into "array|Traversable" as this > then remove