summaryrefslogtreecommitdiff
path: root/Zend/tests/bug80126.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/bug80126.phpt')
-rw-r--r--Zend/tests/bug80126.phpt23
1 files changed, 23 insertions, 0 deletions
diff --git a/Zend/tests/bug80126.phpt b/Zend/tests/bug80126.phpt
new file mode 100644
index 0000000000..3087a40629
--- /dev/null
+++ b/Zend/tests/bug80126.phpt
@@ -0,0 +1,23 @@
+--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===