https://issues.dlang.org/show_bug.cgi?id=12688
Issue ID: 12688
Summary: Strange error if function call is in brackets
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: DMD
Assignee: [email protected]
Reporter: [email protected]
import std.stdio;
struct S {
int foo() @property { return 1; }
}
void main() {
S s;
s.foo.writeln; // ok
(s.foo).writeln; // Error: need 'this' for 'foo' of type '@property int()'
}
--
