Re: Warning for "confusable" types
| From: | Gert | Date: | Mon, 14 Oct 2019 08:17:52 +0000 |
| Subject: | Re: Warning for "confusable" types | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-107539@lists.php.net to get a copy of this message | ||
On that note, since traits aren't possible as a return type. Would it
be possible to determine that the given return type is a trait? In
that case a more specific error message could also be possible.
I don't know much of the internals, so i don't know if that is even
possible atm, but it would be a nice addition.
On Mon, 14 Oct 2019 at 09:53, Stanislav Malyshev <smalyshev@gmail.com> wrote:
>
> Hi!
>
> > I was about to give my +1 on the more generic approach, but type hints
> > could also be interfaces and "instance of the class X" is not a good fit.
>
> We could use "class or interface" if that's important.
>
> --
> Stas Malyshev
> smalyshev@gmail.com
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>