mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
f74e30c07c
RFC: https://wiki.php.net/rfc/abstract_trait_method_validation Closes GH-5068.
21 lines
334 B
PHP
21 lines
334 B
PHP
--TEST--
|
|
Visibility enforcement on abstract trait methods
|
|
--FILE--
|
|
<?php
|
|
|
|
trait T {
|
|
abstract public function method(int $a, string $b);
|
|
}
|
|
|
|
class C {
|
|
use T;
|
|
|
|
/* For backwards-compatibility reasons, visibility is not enforced here. */
|
|
private function method(int $a, string $b) {}
|
|
}
|
|
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
===DONE===
|