blob: 9bf9c1ddb81653bbf4319f8bb9231a2195d86278 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
--TEST--
Bug #75079: self keyword leads to incorrectly generated TypeError when in closure in trait
--FILE--
<?php
trait Foo
{
public function selfDo(self ...$Selfs)
{
array_map(
function (self $Self) : self
{
return $Self;
},
$Selfs
);
}
}
class Bar
{
use Foo;
}
class Baz
{
use Foo;
}
$Bar = new Bar;
$Baz = new Baz;
$Bar->selfDo($Bar, $Bar);
$Baz->selfDo($Baz, $Baz);
?>
===DONE===
--EXPECT--
===DONE===
|