Bug 8826 – PostExpression cannot follow NewExpression

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-10-15T11:50:00Z
Last change time
2013-01-07T17:08:10Z
Assigned to
nobody
Creator
aziz.koeksal

Comments

Comment #0 by aziz.koeksal — 2012-10-15T11:50:58Z
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 ***