Re: [RFC] Interface Default Methods

From: Date: Sat, 17 Jun 2023 22:09:57 +0000
Subject: Re: [RFC] Interface Default Methods
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-120612@lists.php.net to get a copy of this message
On Thu, Jun 15, 2023 at 4:48 AM Levi Morrison via internals < internals@lists.php.net> wrote: > > I am moving my RFC for interface default methods to discussion: > https://wiki.php.net/rfc/interface-default-methods. > > Can I ask, the RFC doesn't say - does your implementation ensure default implementations can only call other methods which exist on the interface in the same manner as Java? i.e. the following would give some sort of error? interface A { public function foo(): void { $this->bar(); } } class B implements A { public function bar(): void { ... } } But the following would be okay? interface A { public function foo(): void { $this->bar(); } public function bar(): void; }

« previous php.internals (#120612) next »