http://d.puremagic.com/issues/show_bug.cgi?id=3705

           Summary: Can't add structs with alias this to an AA.
           Product: D
           Version: 2.038
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: dsim...@yahoo.com


--- Comment #0 from David Simcha <dsim...@yahoo.com> 2010-01-14 08:37:31 PST ---
struct Foo {

    alias returnOne this;

    uint returnOne() {
        return 1;
    }
}

void main() {
    Foo[string] AA;
    AA["bar"] = Foo.init;
}


Errors:

test.d(12): Error: function test.Foo.returnOne () is not callable using
argument types (Foo)
test.d(12): Error: expected 0 arguments, not 1 for non-variadic function type
uint()

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to