mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
4a61d842e7
By using the normal inheritance check if the parent is abstract as well.
29 lines
431 B
PHP
29 lines
431 B
PHP
--TEST--
|
|
Bug #78776: Abstract method implementation from trait does not check "static"
|
|
--FILE--
|
|
<?php
|
|
|
|
abstract class A
|
|
{
|
|
abstract public function createApp();
|
|
}
|
|
|
|
class B extends A
|
|
{
|
|
use C;
|
|
}
|
|
|
|
trait C
|
|
{
|
|
public static function createApp()
|
|
{
|
|
echo "You should not be here\n";
|
|
}
|
|
}
|
|
|
|
B::createApp();
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Cannot make non static method A::createApp() static in class C in %s on line %d
|