From: Pedro Magalhães Date: Fri, 27 Jan 2017 18:44:46 +0000 (+0100) Subject: Added tests demonstrating the same effect with abstracts X-Git-Tag: php-7.1.2RC1~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c11b2b809d349399c8f4b54c6bf24078dece455e;p=php Added tests demonstrating the same effect with abstracts --- diff --git a/Zend/tests/bug73987.phpt b/Zend/tests/bug73987.phpt index 551565650c..610b594a64 100644 --- a/Zend/tests/bug73987.phpt +++ b/Zend/tests/bug73987.phpt @@ -1,5 +1,5 @@ --TEST-- -Bug #73987 (Method compatibility check looks to original definition and not parent) +Bug #73987 (Method compatibility check looks to original definition and not parent - nullability interface) --FILE-- +--EXPECTF-- +Fatal error: Declaration of C::example($a, $b, $c = NULL) must be compatible with B::example($a, $b = NULL, $c = NULL) in %s diff --git a/Zend/tests/bug73987_3.phpt b/Zend/tests/bug73987_3.phpt new file mode 100644 index 0000000000..89e4686ed6 --- /dev/null +++ b/Zend/tests/bug73987_3.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #73987 (Method compatibility check looks to original definition and not parent - return types abstract) +--FILE-- + +--EXPECTF-- +Fatal error: Declaration of C::example(): string must be compatible with B::example(): int in %s