nested function overloading

bauss jj_1337 at live.dk
Fri Jun 17 13:06:45 UTC 2022


On Friday, 17 June 2022 at 13:04:47 UTC, Chris Katko wrote:
> On Friday, 17 June 2022 at 12:19:33 UTC, bauss wrote:
>> On Friday, 17 June 2022 at 12:09:33 UTC, Chris Katko wrote:
>>> I don't need this functionality, but I wanted to be sure.
>>>
>>> Does function overloading not work with nested functions? I 
>>> got a compiler error (something like "function already 
>>> defined") when I tried it.
>>
>> According to the spec then nested functions cannot be 
>> overloaded:
>>
>> "Nested functions cannot be overloaded."
>>
>> See: 19.17.1.3
>>
>> https://dlang.org/spec/function.html#nested
>
> Thanks!
>
> re: documentation. That is one-line tiny footnote in a page 
> that's over 85 pages long on my browser. :) I could easily see 
> many people missing it until they encounter it.

I agree, I didn't know about it either and only found out because 
I decided to search on the page for functions under nested 
functions.


More information about the Digitalmars-d-learn mailing list