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;
}

Reply via email to