D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.

Issue 6701

Summary: template specialization resolution failure
Product: D Reporter: Martin Nowak <code>
Component: dmdAssignee: No Owner <nobody>
Status: RESOLVED FIXED
Severity: normal CC: bugzilla
Priority: P2 Keywords: rejects-valid
Version: D2
Hardware: Other
OS: All

Description Martin Nowak 2011年09月20日 11:10:34 UTC
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.

AltStyle によって変換されたページ (->オリジナル) /