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

           Summary: static opSlice & opIndex functions don't work as
                    template arguments
           Product: D
           Version: D1 & D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: verylonglogin....@gmail.com


--- Comment #0 from Denis <verylonglogin....@gmail.com> 2011-12-14 16:29:58 MSK 
---
---
struct S { }

struct Call
{
    static S opSlice() { return S(); }
    static S opIndex(size_t) { return S(); }
}


template Template(Args...)
{
    static assert(is(typeof(Args[0]) == S));
}

alias Template!(S()) A0; // passes
alias Template!(Call.opSlice())  A1; // passes
alias Template!(Call.opIndex(0)) A2; // passes
alias Template!(Call[])  A3; // failes
alias Template!(Call[0]) A4; // failes
---

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

Reply via email to