Fix deprecated warning in new gh8289.phpt test

This commit is contained in:
Bob Weinand 2022-04-01 17:51:18 +02:00
parent 16dcededa8
commit e4c7ffc152

View File

@ -6,7 +6,7 @@ GH-8289 (Exceptions thrown within a yielded from iterator are not rethrown into
function yieldFromIteratorGeneratorThrows() {
try {
yield from new class(new ArrayIterator([1, -2])) extends IteratorIterator {
public function key() {
public function key(): mixed {
if ($k = parent::key()) {
throw new Exception;
}
@ -31,4 +31,4 @@ Stack trace:
#0 %s(%d): IteratorIterator@anonymous->key()
#1 %s(%d): yieldFromIteratorGeneratorThrows()
#2 {main}
int(2)
int(2)