mirror of
https://github.com/php/php-src.git
synced 2024-11-27 11:53:33 +08:00
Add test for bug #69084
This is another bug fixed by the precending commit.
This commit is contained in:
parent
53efa1b0c6
commit
aa9a3ff891
2
NEWS
2
NEWS
@ -12,6 +12,8 @@ PHP NEWS
|
||||
renamed). (Nikita)
|
||||
. Fixed bug #70839 (Converting optional argument to variadic forbidden by LSP
|
||||
checks). (Nikita)
|
||||
. Fixed bug #69084 (Unclear error message when not implementing a renamed
|
||||
abstract trait function). (Nikita)
|
||||
|
||||
- CURL:
|
||||
. Bumped required libcurl version to 7.29.0. (cmb)
|
||||
|
29
Zend/tests/bug69084.phpt
Normal file
29
Zend/tests/bug69084.phpt
Normal file
@ -0,0 +1,29 @@
|
||||
--TEST--
|
||||
Bug #69084: Unclear error message when not implementing a renamed abstract trait function
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
trait Foo {
|
||||
abstract public function doStuff();
|
||||
|
||||
public function main() {
|
||||
$this->doStuff();
|
||||
}
|
||||
}
|
||||
|
||||
class Bar {
|
||||
use Foo {
|
||||
Foo::doStuff as doOtherStuff;
|
||||
}
|
||||
|
||||
public function doStuff() {
|
||||
var_dump(__FUNCTION__);
|
||||
}
|
||||
}
|
||||
|
||||
$b = new Bar();
|
||||
$b->main();
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Class Bar contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Bar::doOtherStuff) in %s on line %d
|
Loading…
Reference in New Issue
Block a user