Bug 6701 – template specialization resolution failure

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
All
Creation time
2011-09-20T11:10:00Z
Last change time
2012-01-17T14:51:16Z
Keywords
rejects-valid
Assigned to
nobody
Creator
code

Comments

Comment #0 by code — 2011-09-20T11:10:34Z
void foo(uint v:0, string op)() { pragma(msg, "specialized"); } void foo(uint v, string op)() { pragma(msg, "unspecialized"); } void main() { foo!(0u, "+")(); } --- This will give a false error to be ambiguous. It happens due to unintended sharing of global state when creating dummy expressions during partial ordering.
Comment #1 by bugzilla — 2012-01-17T14:51:16Z