kphp
kphp copied to clipboard
Misleading error message when nonexisting class is used in field default initializer
<?php
use Some\Nonexisting;
class Foo {
public static $v = [
Nonexisting::C => 1,
];
}
Expected result: error about the nonexisting class. Actual result:
Compilation error at stage: Calc const types, gen by calc-const-types.cpp:21
example.php:0
Default value of Foo::$v is not constant