1--TEST--
2Typed class constants (incompatible contravariant composition; traits)
3--FILE--
4<?php
5
6trait T {
7    public const array CONST1 = [];
8}
9
10class C {
11    use T;
12
13    public const ?array CONST1 = [];
14}
15
16?>
17--EXPECTF--
18Fatal error: C and T define the same constant (CONST1) in the composition of C. However, the definition differs and is considered incompatible. Class was composed in %s on line %d
19