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

           Summary: Can't use a type from opDispatch template
           Product: D
           Version: 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-10-12 06:53:44 PDT 
---
---
struct T {
    template opDispatch(string name)
    {
        alias int Type;
    }
}

pragma(msg, T.opDispatch!("xxx"), " ", T.xxx); //(T).opDispatch!("xxx")
(T).opDispatch!("xxx")
pragma(msg, T.opDispatch!("xxx").Type, " ", T.xxx.Type); //int int
pragma(msg, is(T.opDispatch!("xxx").Type), " ", is(Flag.xxx.Type)); //true
false

template U(T) { }

void main() {
    T.opDispatch!("xxx").Type i1; //ok
    T.xxx.Type i2; //Error: T.xxx.Type is used as a type

    alias U!(T.opDispatch!("xxx").Type) U1; //ok
    alias U!(T.xxx.Type) U2; //Error: template instance U!(int) does not match
template declaration U(T)
}
---

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

Reply via email to