1--TEST--
2Typed class constant reflection
3--FILE--
4<?php
5
6class Foo {
7    const int CONST1 = C;
8
9    public int $prop1 = Foo::CONST1;
10}
11
12define("C", "bar");
13
14$foo = new ReflectionClass(Foo::class);
15
16try {
17    $foo->getStaticProperties();
18} catch (TypeError $e) {
19    echo $e->getMessage() . "\n";
20}
21
22?>
23--EXPECT--
24Cannot assign string to class constant Foo::CONST1 of type int
25