php-src/Zend/tests/magic_methods_021.phpt
Nikita Popov bb8b95be63 Fix bug #79925
If the expected return type of a magic method is "object", we also
need to allow class types and "static" to comply with covariance.
2020-08-03 10:35:26 +02:00

22 lines
348 B
PHP

--TEST--
__set_state return type should support covariance
--FILE--
<?php
class Foo {
public static function __set_state(array $data): self {}
}
class Foo2 {
public static function __set_state(array $data): static {}
}
class Foo3 {
public static function __set_state(array $data): Foo3|self {}
}
?>
===DONE===
--EXPECT--
===DONE===