]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.4'
authorNikita Popov <nikita.ppv@gmail.com>
Fri, 24 May 2019 09:02:03 +0000 (11:02 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 24 May 2019 09:02:03 +0000 (11:02 +0200)
1  2 
Zend/tests/type_declarations/variance/parent_in_class_failure1.phpt
Zend/zend_compile.c

index 5e1f43d875e62edd1558a867aef9901492089cc5,0000000000000000000000000000000000000000..2261b3c016737f77db6e84e160b419432954790c
mode 100644,000000..100644
--- /dev/null
@@@ -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
Simple merge