Override with function overloads
jmh530 via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Sep 11 08:13:25 PDT 2017
On Monday, 11 September 2017 at 04:29:39 UTC, Ali Çehreli wrote:
>
> Here, the feature called "name hiding" is in effect. Foo2.bar
> hides all bars from Foo. This is to avoid "function
> hijacking"[1].
>
> Ali
>
> [1] https://dlang.org/hijack.html
I suppose my issue is that final should prevent function
hijacking because I shouldn't be allowed to override string
bar(double d) anyway. It shouldn't be a worry.
I did see something in the bugzilla about hijack with default
arguments. So I imagine it's not so easy to get right.
https://issues.dlang.org/show_bug.cgi?id=6679
More information about the Digitalmars-d-learn
mailing list