Re: [RFC] Return Type Declarations

From: Date: Tue, 29 Apr 2014 01:34:11 +0000
Subject: Re: [RFC] Return Type Declarations
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-73839@lists.php.net to get a copy of this message
>
> So I suppose technically we should say that a generator must always return
>> a Traversable?
>
>
> Not quite: a generator always returns a Generator (this is an actual
> object); so it can fulfill Generator, Iterator and Traversable.
>

A recent patch update actually says this in very clear terms; the RFC
simply fell a tad bit behind to reflect the improvement. It has now been
updated.


Thread (28 messages)

« previous php.internals (#73839) next »