if (int bar = .. bug or some thing

codephantom me at noyb.com
Tue Oct 31 06:17:53 UTC 2017


On Tuesday, 31 October 2017 at 04:27:27 UTC, Joel wrote:
> Ok, thanks guys.

why not throw in some UFCS too...just because you can ;-)

import std.stdio;

void main()
{
     int foo;
     if (foo.bar != 0)  // would be nice if I could do: (int 
foo.bar != 0)
     {
         throw new Exception("foo.bar != 0");
     }
}

auto bar(int x,)
{
     return -10;
}



More information about the Digitalmars-d-learn mailing list