Allow arbitrary const expressions in backed enums

Closes GH-7821
Closes GH-8190
Closes GH-8418
This commit is contained in:
Ilija Tovilo 2022-03-10 22:35:01 +01:00
parent 5a855ee8d6
commit ddc0b490f7
No known key found for this signature in database
GPG key ID: A4F5D403F118200A
23 changed files with 287 additions and 144 deletions

View file

@ -1485,7 +1485,7 @@ static void reflection_enum_case_factory(zend_class_entry *ce, zend_string *name
{
reflection_object *intern;
zend_class_entry *case_reflection_class = ce->backed_enum_table == IS_UNDEF
zend_class_entry *case_reflection_class = ce->enum_backing_type == IS_UNDEF
? reflection_enum_unit_case_ptr
: reflection_enum_backed_case_ptr;
reflection_instantiate(case_reflection_class, object);