diff options
author | Julien Pauli <jpauli@php.net> | 2014-12-12 16:14:24 +0100 |
---|---|---|
committer | Julien Pauli <jpauli@php.net> | 2014-12-12 16:14:24 +0100 |
commit | ebe755f14942b63125f6f0ab3054e9d086d28382 (patch) | |
tree | 2ee489527e42cc6b783d896f7c668a05d2d0d675 /Zend/tests | |
parent | 2e735660d2f46da7b4918a4c9ff92d707e00c264 (diff) | |
parent | 4cda98264ec4ab80e9ca54c10cf2f332d6e09290 (diff) | |
download | php-git-ebe755f14942b63125f6f0ab3054e9d086d28382.tar.gz |
Merge branch 'PHP-5.6'
* PHP-5.6:
Updated NEWS
Updated NEWS
Fixed Bug #65576 (Constructor from trait conflicts with inherited constructor)
Conflicts:
Zend/zend_compile.c
Diffstat (limited to 'Zend/tests')
-rw-r--r-- | Zend/tests/traits/bug65576a.phpt | 31 | ||||
-rw-r--r-- | Zend/tests/traits/bug65576b.phpt | 33 |
2 files changed, 64 insertions, 0 deletions
diff --git a/Zend/tests/traits/bug65576a.phpt b/Zend/tests/traits/bug65576a.phpt new file mode 100644 index 0000000000..49b2ba0c96 --- /dev/null +++ b/Zend/tests/traits/bug65576a.phpt @@ -0,0 +1,31 @@ +--TEST-- +Bug #65576 (Constructor from trait conflicts with inherited constructor) +--FILE-- +<?php + +trait T +{ + public function __construct() + { + echo "Trait contructor\n"; + } +} + +class A +{ + public function __construct() + { + echo "Parent constructor\n"; + } +} + +class B extends A +{ + use T; +} + +new B(); + +--EXPECT-- +Trait contructor + diff --git a/Zend/tests/traits/bug65576b.phpt b/Zend/tests/traits/bug65576b.phpt new file mode 100644 index 0000000000..3be52ba7c9 --- /dev/null +++ b/Zend/tests/traits/bug65576b.phpt @@ -0,0 +1,33 @@ +--TEST-- +Bug #65576 (Constructor from trait conflicts with inherited constructor) +--FILE-- +<?php + +trait T +{ + public function __construct() + { + parent::__construct(); + echo "Trait contructor\n"; + } +} + +class A +{ + public function __construct() + { + echo "Parent constructor\n"; + } +} + +class B extends A +{ + use T; +} + +new B(); + +--EXPECT-- +Parent constructor +Trait contructor + |