D issues are now
tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Summary: |
template specialization resolution failure |
Product: |
D
|
Reporter: |
Martin Nowak <code> |
Component: |
dmd | Assignee: |
No Owner <nobody> |
Status: |
RESOLVED
FIXED
|
Severity: |
normal
|
CC: |
bugzilla
|
Priority: |
P2
|
Keywords: |
rejects-valid |
Version: |
D2 |
Hardware: |
Other |
OS: |
All |
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.