summaryrefslogtreecommitdiff
path: root/Zend/tests/traits/abstract_method_10.phpt
blob: 3dcd603d414763459c4492f0f3a4150701b1da4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--TEST--
Abstract method in trait using "self" (invalid)
--FILE--
<?php

trait T {
    abstract private function method(self $x): self;
}

class C {
    use T;

    private function method(int $x): int { }
}

?>
===DONE===
--EXPECTF--
Fatal error: Declaration of C::method(int $x): int must be compatible with T::method(C $x): C in %s on line %d