mirror of
https://github.com/php/php-src.git
synced 2024-10-02 15:26:06 +00:00
76772dc20d
# this now results also in a compilation error, since it would open the door for inconsistencies, and violates the DRY principle.
20 lines
367 B
PHP
20 lines
367 B
PHP
--TEST--
|
|
Bug #54441 (Changing trait static method visibility)
|
|
--FILE--
|
|
<?php
|
|
|
|
trait Foo {
|
|
public function bar() {}
|
|
}
|
|
|
|
class Boo {
|
|
use Foo {
|
|
bar as dontKnow;
|
|
dontKnow as protected;
|
|
}
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: The modifiers for the trait alias dontKnow() need to be changed in the same statment in which the alias is defined. Error in %s on line %d
|