mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
22 lines
263 B
Plaintext
22 lines
263 B
Plaintext
|
--TEST--
|
||
|
Abstract method in trait using "self"
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
trait T {
|
||
|
abstract private function method(self $x): self;
|
||
|
}
|
||
|
|
||
|
class C {
|
||
|
use T;
|
||
|
|
||
|
private function method(self $x): self {
|
||
|
return $this;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
?>
|
||
|
===DONE===
|
||
|
--EXPECT--
|
||
|
===DONE===
|