[Issue 5831] New: Template specialization ordering bug
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Apr 10 14:31:08 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5831
Summary: Template specialization ordering bug
Product: D
Version: D2
Platform: Other
OS/Version: Mac OS X
Status: NEW
Keywords: rejects-valid
Severity: major
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: code at klickverbot.at
--- Comment #0 from klickverbot <code at klickverbot.at> 2011-04-10 14:27:26 PDT ---
The following snippet produces an ambiguity error with the latest DMD 2
(0219a5f):
---
struct Foo(T) {}
struct Foo(T : Bar!R, U = int, R) {}
struct Bar(R) {}
Foo!(Bar!float) f;
---
If the »U = int« parameter is removed, the second overload is correctly
selected:
---
struct Foo(T) { pramga(msg, "1"); }
struct Foo(T : Bar!R, R) { pragma(msg, "2"); }
struct Bar(R) {}
Foo!(Bar!float) f; // prints 2
---
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list