www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12688] New: Strange error if function call is in brackets

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: nobody puremagic.com
          Reporter: temtaime gmail.com

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()'
}

--
May 01 2014