php-src/Zend/tests/traits/bug54441.phpt
Nikita Popov 2c5fcd57c0 Resolve trait alias refers to earlier
Make sure all trait method references are converted to absolute
method references in advance. This regresses one error message
that I don't think is particularly valuable.
2020-03-03 14:23:31 +01:00

20 lines
340 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 of the trait method dontKnow() are changed, but this method does not exist. Error in %s on line %d