1--TEST--
2Property types must be invariant
3--FILE--
4<?php
5
6interface X {}
7interface Y {}
8
9class A {
10    public (X&Y)|L $prop;
11}
12class B extends A {
13    public (X&Y&Z)|L $prop;
14}
15
16?>
17--EXPECTF--
18Fatal error: Type of B::$prop must be (X&Y)|L (as in class A) in %s on line %d
19