Description
Enum case objects expose ->name in PHP, but Elephc rejects that property access at compile time.
Steps to reproduce
<?php
enum E { case A; }
echo E::A->name;
Expected behavior
PHP 8.4.19 prints:
Actual behavior
Elephc fails to compile with:
error[1:35]: Undefined property: E::name
Environment
- Elephc commit:
02ffd63c0efdd8b5dd4069e0b6bd58dfe2a9325d
- PHP:
8.4.19
- OS:
Darwin 25.5.0 arm64
- Reproduced on:
2026-06-04T07:05:57Z
Description
Enum case objects expose
->namein PHP, but Elephc rejects that property access at compile time.Steps to reproduce
Expected behavior
PHP 8.4.19 prints:
Actual behavior
Elephc fails to compile with:
Environment
02ffd63c0efdd8b5dd4069e0b6bd58dfe2a9325d8.4.19Darwin 25.5.0 arm642026-06-04T07:05:57Z