1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/Zend/tests/traits/abstract_method_6.phpt
DanielEScherzer b436ef479e GH-15994: fix suggestion that anonymous classes be made abstract (GH-15995)
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.
2024-09-26 00:05:12 +02:00

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