hhvm / hack-codegen

Library to programatically generate Hack code and write it to signed files
https://hhvm.github.io/hack-codegen/
MIT License
341 stars 93 forks source link

CodegenEnum should stop extending CodegenClassish #106

Closed fredemmott closed 6 years ago

fredemmott commented 6 years ago

CodegenClassish has too many features, such as abstract constants, interfaces, type constants, parent classes.

gmarcotte commented 5 years ago

I think this change makes it so that there's no way to add an enum into a CodegenFile, since there are only methods to addClass (CodegenClassish, which no longer works for enums), addConstant, addTrait, addFunction, and add(Before/After)Types. Unless I'm missing something.