Closed gmarcotte closed 5 years ago
@gmarcotte just want to say thanks, and we're aware of this PR, and it LGTM. I'm holding off on merging it until unrelated issues with the nightlies are fixed
merged as 9af145b58e68e472930e913cc6390242b5a56da1
thanks @fredemmott !
youareawesome :)
Summary: In commit cd388d6c24cbeb3a5b55e6226274e63dcc6ce189 to hhvm/hack-codegen, CodegenEnum stopped extending CodegenClassish, which means that CodegenFile::addClass can no longer be used to add an Enum into CodegenFile.
This diff adds methods CodegenFile::addEnum[s]/getEnums identical to addClass[es]/getClasses but that operate on CodegenEnum instances. When the CodegenFile is rendered, enums will be rendered after constants and before any functions or classes.
Test Plan: Add a test case into tests/CodegenFileTest