[Issue 6479] New: spurious alias this with struct and mixin template

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Aug 12 12:22:37 PDT 2011


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

           Summary: spurious alias this with struct and mixin template
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: mrmocool at gmx.de


--- Comment #0 from Trass3r <mrmocool at gmx.de> 2011-08-12 12:22:30 PDT ---
struct Memory
{
    mixin Wrapper!();
}
struct Image
{
    Memory sup;
    alias sup this;
}
mixin template Wrapper()
{
}

$ dmd -c test.d 
DMD v2.054 DEBUG
test.d(8): Error: alias this there can be only one alias this

As soon as the template precedes Image, it works.
In my real code this is all spread among different modules, so it also is an
order of compilation dependent issue.

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


More information about the Digitalmars-d-bugs mailing list