www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3705] New: Can't add structs with alias this to an AA.

reply d-bugmail puremagic.com writes:
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: nobody puremagic.com
        ReportedBy: dsimcha yahoo.com


--- Comment #0 from David Simcha <dsimcha 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: -------
Jan 14 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3705


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug yahoo.com.au


--- Comment #1 from Don <clugdbug yahoo.com.au> 2010-11-01 13:35:25 PDT ---
Fixed DMD2.050.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 01 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3705


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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