1--TEST--
2Co-variance check failure for intersection type where child removes one of intersection type members
3--FILE--
4<?php
5
6interface A {}
7interface B {}
8
9class Test implements A, B {}
10
11class Foo {
12    public function foo(): A&B {
13        return new Test();
14    }
15}
16
17/* This fails because just A larger than A&B */
18class FooChild extends Foo {
19    public function foo(): A {
20        return new Test();
21    }
22}
23
24?>
25--EXPECTF--
26Fatal error: Declaration of FooChild::foo(): A must be compatible with Foo::foo(): A&B in %s on line %d
27