6701 – template specialization resolution failure

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6701 - template specialization resolution failure
Summary: template specialization resolution failure
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other All
: P2 normal
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks:
Reported: 2011年09月20日 11:10 UTC by Martin Nowak
Modified: 2012年01月17日 14:51 UTC (History)
1 user (show)

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
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 によって変換されたページ (->オリジナル) /