mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00

Use a shared non-terminal for all class modifiers. This avoids conflicts when adding modifiers that are only valid for certain targets. This change is necessary for asymmetric visibility but might be useful for other future additions. Closes GH-9926
12 lines
203 B
PHP
12 lines
203 B
PHP
--TEST--
|
|
Method cannot be readonly in trait alias
|
|
--FILE--
|
|
<?php
|
|
|
|
class Test {
|
|
use T { foo as readonly; }
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Cannot use the readonly modifier on a method in %s on line %d
|