summaryrefslogtreecommitdiff
path: root/Zend/tests/traits/bug65576b.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/traits/bug65576b.phpt')
-rw-r--r--Zend/tests/traits/bug65576b.phpt33
1 files changed, 33 insertions, 0 deletions
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
+