Local function overloading
Philpax
phillip at philliplarkson.com
Sun Apr 13 01:40:17 PDT 2014
Thanks! I used the static struct solution.
I did some quick research, and I think that the reason why the
original code doesn't work is because the two functions have the
same identifier, which results in Dsymboltable::insert rejecting
the second function. I haven't tested this hypothesis, but I
suspect this to be the case.
A simple solution would be to assign unique identifiers to each
function, but I haven't experimented with DMD source enough to
determine what the side-effects of such a change would be. Is not
being able to overload functions in local scope intended
behaviour?
More information about the Digitalmars-d-learn
mailing list