com php-src: Merge branch 'PHP-7.4': Zend/tests/type_declarat ions/variance/parent_in_class_failure1.phpt Zend/ze nd_compile.c
| From: | Nikita Popov | Date: | Fri, 24 May 2019 09:02:03 +0000 |
| Subject: | com php-src: Merge branch 'PHP-7.4': Zend/tests/type_declarat ions/variance/parent_in_class_failure1.phpt Zend/ze nd_compile.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-106322@lists.php.net to get a copy of this message | ||
Commit: 038db184964bffbc57031534660ee769ca246626
Author: Nikita Popov <nikita.ppv@gmail.com> Fri, 24 May 2019 11:02:03 +0200
Parents: e3d5aa42ca8582e22b500d620ad7c9ed6cdcb3be 32f87bb575fc147dea57770d5f175831b8662141
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=038db184964bffbc57031534660ee769ca246626
Log:
Merge branch 'PHP-7.4'
Changed paths:
MA Zend/tests/type_declarations/variance/parent_in_class_failure1.phpt
MM Zend/zend_compile..c
Diff:
diff --cc Zend/tests/type_declarations/variance/parent_in_class_failure1.phpt
index 5e1f43d,0000000..2261b3c
mode 100644,000000...100644
--- a/Zend/tests/type_declarations/variance/parent_in_class_failure1.phpt
+++ b/Zend/tests/type_declarations/variance/parent_in_class_failure1.phpt
@@@ -1,16 -1,0 +1,18 @@@
+--TEST--
+Use of parent inside a class that has / has no parent (failure case 1)
+--FILE--
+<?php
+
+// Illegal: A::parent is ill-defined
+class A {
+ public function method(parent $x) {}
+}
+class B extends A {
+ public function method(parent $x) {}
+}
+
+?>
+--EXPECTF--
++Deprecated: Cannot use "parent" when current class scope has no parent in %s on line %d
++
+Fatal error: Could not check compatibility between B::method(A $x) and A::method(parent $x),
because class parent is not available in %s on line %d