class X
{
int a;
this(int a)
{}
X opCall(X other)
{
return this;
}
}
auto x = new X(3)(null); // Error: semicolon expected following auto declaration, not '('
auto a = new X(3).a; // Error: semicolon expected following auto declaration, not '.'
// Wrapping with parentheses works. Would be neat if this wasn't necessary.
auto a = (new X(3)).a;
Comment #1 by yebblies — 2013-01-07T17:08:10Z
*** This issue has been marked as a duplicate of issue 8635 ***