php-src/Zend/tests/magic_methods/magic_methods_021.phpt
Gina Peter Banyard 1ad7743133
Zend: Resolve self and parent types at compile time (#17755)
This does not apply to traits.
2025-02-11 15:15:32 +00:00

21 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|Foo2 {}
}
?>
===DONE===
--EXPECT--
===DONE===