mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
In the process, remove the (incorrect) assumption that any abstract method that needs to be implemented by a class that cannot itself be made abstract must be a private method - the existing test for an enum already showed that this was not the case.
21 lines
345 B
PHP
21 lines
345 B
PHP
--TEST--
|
|
Abstract private trait method not implemented
|
|
--FILE--
|
|
<?php
|
|
|
|
trait T {
|
|
abstract private function method(int $a, string $b);
|
|
}
|
|
|
|
abstract class C {
|
|
use T;
|
|
}
|
|
|
|
class D extends C {
|
|
private function method(int $a, string $b) {}
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Class C must implement 1 abstract method (C::method) in %s on line %d
|