param2 = param1

Andrej Mitrovic andrej.mitrovich at gmail.com
Tue Aug 27 14:51:36 PDT 2013


On 8/27/13, <luis at luismarques.eu>"@puremagic.com <"\"Luís".Marques"> wrote:
>      // Not OK
>      int foo(int x, int y = x)
>      {
>          return x*y;
>      }

Personally I think a much more useful feature would be (and this
doesn't block this feature but it's related to default arguments):

struct S
{
    void foo(int x = this.y)
    {
    }

    int y;
}


More information about the Digitalmars-d mailing list