On Tue, Apr 19, 2016 at 7:56 PM, Jesse Schalken <m...@jesseschalken.com> wrote: >> class Collection<T as (Traversable | Countable)> {... > > I think the "where T is Traversable, T is Countable" syntax was intended to > represent the intersection (i.e. a "Countable Traversable"), not the union. > > So you would need an intersection syntax > > class Collection<T as Traversable & Countable> {... > And that's precisely my point for why reusing the suggested syntax for union types makes sense. You can to specify either intersection or union (or potentially a complex combination of the two (A | (B & C))), rather than being limited to intersections only.
-Sara -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php