Should it be a compile time error?

John Colvin john.loughran.colvin at gmail.com
Wed Jun 19 07:11:55 PDT 2013


On Wednesday, 19 June 2013 at 11:33:43 UTC, deed wrote:
> Should this be a compile time error?

Yes it should, in an ideal world. Expanding out the assign 
property, what we've got is:

void var(int i)
{
      var(i);   // endless recursion.
}

Linux segfaults on stack overflow, so that's your crash.


More information about the Digitalmars-d-learn mailing list