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