D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 11328 - Nulled type template instantiation cached so all usages of null returns the same result
Summary: Nulled type template instantiation cached so all usages of null returns the s...
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P3 normal
Assignee: No Owner
URL: http://forum.dlang.org/thread/gfdqabt...
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-23 01:20 UTC by simendsjo
Modified: 2023-02-11 04:48 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description simendsjo 2013-10-23 01:20:51 UTC
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*
}