mirror of
https://github.com/php/php-src.git
synced 2026-04-21 15:08:16 +02:00
f74e30c07c
RFC: https://wiki.php.net/rfc/abstract_trait_method_validation Closes GH-5068.
23 lines
325 B
PHP
23 lines
325 B
PHP
--TEST--
|
|
Mutually incompatible methods from traits are fine as long as the final method is compatible
|
|
--FILE--
|
|
<?php
|
|
|
|
trait T1 {
|
|
abstract public function test();
|
|
}
|
|
trait T2 {
|
|
abstract public function test(): int;
|
|
}
|
|
|
|
class C {
|
|
use T1, T2;
|
|
|
|
public function test(): int {}
|
|
}
|
|
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
===DONE===
|