digitalmars.D.bugs - [Issue 5831] New: Template specialization ordering bug
- d-bugmail puremagic.com (33/33) Apr 10 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5831
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 puremagic.com
ReportedBy: code klickverbot.at
---
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: -------
Apr 10 2011








d-bugmail puremagic.com