php-src/Zend/tests/bug80391.phpt
Nikita Popov 912cb8b8b5 Fixed bug #80391
Iterable was not considered a subtype of array|object, and thus
also not a subtype of mixed.
2020-11-24 10:09:28 +01:00

24 lines
479 B
PHP

--TEST--
Iterable not covariant to mixed
--FILE--
<?php
class A {
public function method1(): mixed {}
public function method2(): array|object {}
public function method3(iterable $x) {}
public function method4(iterable $x) {}
}
class B extends A {
public function method1(): iterable {}
public function method2(): iterable {}
public function method3(mixed $x) {}
public function method4(array|object $x) {}
}
?>
===DONE===
--EXPECT--
===DONE===