haxe
haxe copied to clipboard
Allow `@:inheritDoc var field` to search for documentation in implemented interfaces
This PR allows @:inheritDoc (without arguments) to search parent interface field for documentation, if there is no parent class field doc.
Isn't that use case pretty niche? A build macro (or addGlobalMetadata) could do that job easily
I guess it can work, then there is only @:inheritDoc improvement to also check interfaces field and not only parent class field, should be useful
I think this makes sense. A test would be nice, or at least a code example of what case it helps with (I could then help with writing the test if needed)
@kLabz this should be ok
I'm not sure. What are the rules here for deciding what documentation is included or not?
class Foo implements IFoo implements IFoo2 extends Parent {
/** Foo test **/
@:inheritDoc public override function test():Void {}
}
It concats field documentation from first non-empty parent documentation to function test(), always checking parent class test() first and then all interfaces in declaration order (Parent.test then IFoo.test then IFoo2.test docs).