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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Oct 23 01:20:53 PDT 2013


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 at puremagic.com
        ReportedBy: simendsjo at gmail.com


--- Comment #0 from simendsjo <simendsjo at gmail.com> 2013-10-23 01:20:51 PDT ---
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: -------


More information about the Digitalmars-d-bugs mailing list