Summary: Can't call templated properties as properties from
                    within class
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from David Simcha <> 2010-07-24 09:48:24 PDT ---
class Foo {
    int _num;

    int num()()  {
        return _num;

    void doStuff() {
        int i = num;  // Broken

void main() {
    auto foo = new Foo;
    auto n = foo.num;  // Works

test9.d(8): Error: template num() has no value
test9.d(8): Error: cannot implicitly convert expression (num()) of type void to

If I comment out Foo.doStuff(), the line `auto n = bar.num;` works, apparently
becuase it's not inside the class.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to