xref: /php-src/Zend/tests/gh8821.phpt (revision 99fa740a)
1--TEST--
2GH-8821: Fix reported line number of constant expression
3--FILE--
4<?php
5
6enum Alpha {
7    case Foo;
8}
9
10class Bravo {
11    public const C = [Alpha::Foo => 3];
12}
13
14new Bravo();
15
16?>
17--EXPECTF--
18Fatal error: Uncaught TypeError: Cannot access offset of type Alpha on array in %sgh8821.php:8
19Stack trace:
20#0 %sgh8821.php(11): [constant expression]()
21#1 {main}
22  thrown in %sgh8821.php on line 8
23