hack-codegen icon indicating copy to clipboard operation
hack-codegen copied to clipboard

Cannot codegen interface to extend another interface

Open Swahvay opened this issue 5 years ago • 3 comments

There is no setExtends or setExtendsf method on CodegenInterface.

Swahvay avatar Dec 09 '19 04:12 Swahvay

This is provided by ->addInterface(), ->setInterfaces() etc in https://github.com/hhvm/hack-codegen/blob/master/src/CodegenClassWithInterfaces.hack - though it does feel strange that it doesn't match the language syntax.

fredemmott avatar Dec 09 '19 16:12 fredemmott

Should we add addExtends and setExtends as aliases (for CodegenInterface only) to those functions?

jjergus avatar Dec 09 '19 17:12 jjergus

I'm not sure; both really have advantages - this is probably best just to be reviewed when/if it's re-unified with fb www

fredemmott avatar Dec 09 '19 17:12 fredemmott