1--TEST--
2Internal covariant return type of self
3--FILE--
4<?php
5class Foo {
6    public static function test() : self {
7        return new Foo;
8    }
9}
10
11class Bar extends Foo {
12    public static function test() : self {
13        return new Bar;
14    }
15}
16
17echo get_class(Bar::test());
18
19?>
20--EXPECT--
21Bar
22