http://d.puremagic.com/issues/show_bug.cgi?id=9873
Summary: Built-in tuple should support equality comparison
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Kenji Hara <[email protected]> 2013-04-04 02:42:06 PDT ---
Test case:
----
template Seq(T...) { alias Seq = T; }
struct Tup(T...) { T field; alias field this; }
void main()
{
auto seq1 = Seq!(1, "hi");
auto tup1 = Tup!(int, string)(1, "hi");
assert(Seq!(1, "hi") == Seq!(1, "hi"));
assert(Seq!(1, "hi") == seq1);
assert(Seq!(1, "hi") == tup1);
assert(seq1 == Seq!(1, "hi", [1,2])); // should be compiler error
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------