[Issue 17941] arity (and probably others) only consider the first lexically present function

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jan 28 05:37:01 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=17941

--- Comment #3 from dechcaudron+dlang.issue.tracking at protonmail.com ---
> a real solution would allow people to indicate which overload they're interested in

Maybe allow something of the sort

static assert(arity!fun(int) == 1);
static assert(arity!gun(int, int) == 2);

?

I had reported this as a Phobos issue (see above), but since it has been marked
as a duplicate for a dmd one, there's not much I can do. Compiler stuff is
still magic to me, I'm afraid.

--


More information about the Digitalmars-d-bugs mailing list