Re: Possible Bug with Interface, Constants and Inheritance
| From: | Bishop Bettini | Date: | Mon, 27 Jun 2016 15:55:00 +0000 |
| Subject: | Re: Possible Bug with Interface, Constants and Inheritance | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-94286@lists.php.net to get a copy of this message | ||
On Mon, Jun 27, 2016 at 11:44 AM, Rowan Collins <rowan.collins@gmail.com>
wrote:
>
> PHP Fatal error: Cannot inherit previously-inherited or override
>> constant C1 from interface I1 in
>>
>
> Can I just say this is a positively hideous error message. I can't
> actually figure out how to parse its grammar: is it (inherit
> previously-inherited) OR (override)? If so, what does "inherit
> previously-inherited" mean?
>
>
+1 on hideous.
From this test
<https://github.com/php/php-src/blob/master/Zend/tests/errmsg_025.phpt>,
I
believe "previously-inherited" refers to this situation:
interface I1 { const BAR = 242; }
interface I2 { const BAR = 242; }
class Foo implements I1, I2 { };