On 08/20/2015 08:05 PM, H. S. Teoh via Digitalmars-d wrote:
On Thu, Aug 20, 2015 at 01:50:11PM -0400, Steven Schveighoffer via 
Digitalmars-d wrote:
[...]
The main reason why it caused issues is this nice idiom:

if(auto arr = someFunction())
{
    // use arr
}

This would HAVE to be split out to two statements, and the arr variable
would be scoped outside of the if statement.
[...]

I wish the language would accept:

        if ((auto arr = someFunction()) !is null)
        {
                ...
        }

But IIRC, auto cannot be used except at the top level expression.
...

You want !=, not !is.

Reply via email to