From 5d869df75329530a28860a3c2399ab32414fe5bc Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Mon, 13 Jan 2020 11:34:04 +0100 Subject: Make class name references use the class_name production Throw a compile error for "static" references instead, where it isn't already the case. Also extract the code that does that -- we have quite a few places where we get a const class ref and require it to be default. --- Zend/tests/static_in_trait_insteadof_reference.phpt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Zend/tests/static_in_trait_insteadof_reference.phpt (limited to 'Zend/tests/static_in_trait_insteadof_reference.phpt') diff --git a/Zend/tests/static_in_trait_insteadof_reference.phpt b/Zend/tests/static_in_trait_insteadof_reference.phpt new file mode 100644 index 0000000000..95a6b3c170 --- /dev/null +++ b/Zend/tests/static_in_trait_insteadof_reference.phpt @@ -0,0 +1,18 @@ +--TEST-- +Cannot use static in trait insteadof method reference +--FILE-- + +--EXPECTF-- +Fatal error: Cannot use 'static' as trait name, as it is reserved in %s on line %d -- cgit v1.2.1