mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
3b7c8bb973
When performing an unlinked instanceof, we also need to consider interfaces of parent classes, as they may not have been inherited yet.
24 lines
321 B
PHP
24 lines
321 B
PHP
--TEST--
|
|
Bug #80126: Covariant return types failing compilation
|
|
--FILE--
|
|
<?php
|
|
|
|
interface I {
|
|
public function method(): I;
|
|
}
|
|
|
|
abstract class A implements I {
|
|
public function method(): I { }
|
|
}
|
|
|
|
class C extends A { }
|
|
|
|
class C2 extends C {
|
|
public function method(): C2 { }
|
|
}
|
|
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
===DONE===
|