Bug 11328 – Nulled type template instantiation cached so all usages of null returns the same result

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-10-23T01:20:51Z
Last change time
2023-02-11T04:48:01Z
Assigned to
No Owner
Creator
simendsjo

Comments

Comment #0 by simendsjo — 2013-10-23T01:20:51Z
See also: http://forum.dlang.org/thread/[email protected] 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* }