|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-02-26 11:52 UTC] requinix@php.net
-Status: Open
+Status: Duplicate
[2018-02-26 11:52 UTC] requinix@php.net
[2018-02-26 11:52 UTC] kelunik@php.net
-Status: Duplicate
+Status: Open
-Type: Bug
+Type: Feature/Change Request
[2018-02-26 11:53 UTC] kelunik@php.net
-Status: Open
+Status: Duplicate
[2018-02-26 11:53 UTC] kelunik@php.net
[2018-02-26 11:55 UTC] krakjoe@php.net
-Status: Duplicate
+Status: Not a bug
[2018-02-26 11:55 UTC] krakjoe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 12:00:02 2025 UTC |
Description: ------------ Greetings, I believe the following should be allowed. class Animal {} class Cat extends Animal {} class My1 { public function getAnimal () : Animal {} } class My2 extends My1 { public function getAnimal () : Cat {} } Because Cat is a Animal and thus compatible with the inherited signature. Thanks in advance. Expected result: ---------------- No errors Actual result: -------------- Compile error