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