Re: On abstract methods defined on traits

From: Date: Sat, 04 Aug 2018 11:04:18 +0000
Subject: Re: On abstract methods defined on traits
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-103040@lists.php.net to get a copy of this message
On 03.08.2018 at 20:47, Pedro Magalhães wrote: > On Fri, Aug 3, 2018 at 7:22 PM Christoph M. Becker <cmbecker69@gmx.de> > wrote: > >> Frankly, I don't understand what this bug report is about, >> <https://3v4l.org/38lmA> looks pretty much expected >> (note that the error >> message is totally different from what has been reported; there is no >> class D in the reproduce script). > > Yes, the report is not very clear. But if we follow the docs logic, > A::values in your example should fail to compile as it doesn't have the > same signature (return type) as the method from the trait T. Ah, now I see. Thanks! In other words, <https://3v4l.org/2pERT> is fine, but <https://3v4l.org/ouO0R> is not. I find that rather strange. -- Christoph M. Becker

« previous php.internals (#103040) next »