cannot have overloaded nested functions?

Steven Schveighoffer schveiguy at yahoo.com
Wed May 15 17:48:19 PDT 2013


On Wed, 15 May 2013 19:10:49 -0400, Timothee Cour  
<thelastmammoth at gmail.com> wrote:

> why isn't this supported?
>
>  void main(){
>     void fun();
>     void fun(int x);//Error: declaration fun is already defined
> }

Don't know, but it hasn't been supported ever.  Spec clearly states it's  
not supported, but not why.  I suppose it is not difficult to name it  
something else?

Note that there are a lot of different rules with nested functions that  
don't apply to normal functions.

-Steve


More information about the Digitalmars-d-learn mailing list