Add internal interfaces for the different types of enum
Closed this issue · 6 comments
Crell commented
interface Enum
interface UnitEnum extends Enum { public function cases() }
interface ScalarEnum extends Enum { public function value(), public static function from() }
interface TaggedEnum extends Enum
Crell commented
RFC has been updated accordingly. @iluuu1994, mark this closed when it's been implemented.
iluuu1994 commented
According to Nikita my parser workaround for allowing Enum
is not sufficient. I think we should drop the Enum
interface for now. It is redundant as we now have is_enum
.
Crell commented
I think I already removed the Enum interface from the RFC itself.
iluuu1994 commented
It's still under "New interfaces"
Crell commented
Removed.
iluuu1994 commented
Thanks 🙂