diff options
Diffstat (limited to 'Zend/tests/bug80126_2.phpt')
-rw-r--r-- | Zend/tests/bug80126_2.phpt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Zend/tests/bug80126_2.phpt b/Zend/tests/bug80126_2.phpt new file mode 100644 index 0000000000..707d1b5a45 --- /dev/null +++ b/Zend/tests/bug80126_2.phpt @@ -0,0 +1,27 @@ +--TEST-- +Bug #80126: Covariant return types failing compilation (variation 2) +--FILE-- +<?php + +interface I { + public function method(): I; +} + +abstract class A implements I { + public function method(): I { + return new static(); + } +} + +class C extends A { } + +interface I2 { } + +class C2 extends C implements I2 { + public function method(): C2 { } +} + +?> +===DONE=== +--EXPECT-- +===DONE=== |