Re: Bug: Can't inherit abstract function

From: Date: Tue, 12 Oct 2004 07:34:00 +0000
Subject: Re: Bug: Can't inherit abstract function
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-13276@lists.php.net to get a copy of this message
Andi Gutmans wrote:
What do you expect to happen? BTW, I see an additional problem. You aren't supposed to be able to use access modifiers such as public/abstract in an interface definition. This is something we have to fix. It should be: interface Drawable { function draw(); }
I would be very grateful if you could explain the logic behind not being able to define public/protected/private/static access modifiers for interface methods (obviously they are abstract by definition). AFAICS (not that far I admit!) not being able to define public/protected/private/static for interface methods removes a lot of the power of interfaces (in terms of being able to define specifics) tia, jochem
Andi At 03:26 PM 10/9/2004 +0200, Timm Friebe wrote:
Hi, the attached script produces: Fatal error: Can't inherit abstract function Drawable::draw() (previously declared abstract in Figure) in /usr/home/thekid/r.php on line 12 which is wrong because I am not inheriting anything but implementing an interface. The problem is that both zend_do_inheritance() *and* zend_do_implement_interface() use (merge_checker_func_t) do_inherit_method_check. Want me to open a bug report? - Timm -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.internals (#13276) next »