summaryrefslogtreecommitdiff
path: root/Zend/tests/traits/language015.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/traits/language015.phpt')
-rw-r--r--Zend/tests/traits/language015.phpt17
1 files changed, 17 insertions, 0 deletions
diff --git a/Zend/tests/traits/language015.phpt b/Zend/tests/traits/language015.phpt
new file mode 100644
index 0000000..0c9fb4a
--- /dev/null
+++ b/Zend/tests/traits/language015.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Invalid conflict resolution (unused trait as lhs of "insteadof")
+--FILE--
+<?php
+trait T1 {
+ function foo() {echo "T1\n";}
+}
+trait T2 {
+ function foo() {echo "T2\n";}
+}
+class C {
+ use T1 {
+ T2::foo insteadof T1;
+ }
+}
+--EXPECTF--
+Fatal error: Required Trait T2 wasn't added to C in %slanguage015.php on line %d