www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11328] New: Nulled type template instantiation cached so all usages of null returns the same result

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

           Summary: Nulled type template instantiation cached so all
                    usages of null returns the same result
           Product: D
           Version: D2
          Platform: All
               URL: http://forum.dlang.org/thread/gfdqabtlqiwatkowmtxy for
                    um.dlang.org
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: simendsjo gmail.com



See also: http://forum.dlang.org/thread/gfdqabtlqiwatkowmtxy forum.dlang.org

template A(alias T) {
    alias A = T;
}

void main() {
    struct S { }
    static assert(is(typeof(A!(cast(S*)null)) == S*));
    //pragma(msg, typeof(A!null)); // S*
    static assert(is(typeof(A!(null) == typeof(null)))); // still S*
}

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