digitalmars.D.bugs - [Issue 16083] New: AliasSeq loses type of enums that have the same
- via Digitalmars-d-bugs (25/25) May 27 2016 https://issues.dlang.org/show_bug.cgi?id=16083
https://issues.dlang.org/show_bug.cgi?id=16083 Issue ID: 16083 Summary: AliasSeq loses type of enums that have the same value Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: yazan.dabain gmail.com import std.meta : AliasSeq; enum A : string { a = "foo" } enum B : string { b = "foo" } alias AA = AliasSeq!(A.a); alias BB = AliasSeq!(B.b); static assert(is(typeof(AA[0]) == A)); static assert(is(typeof(BB[0]) == B)); // this fails --------------------- The problem disappears by doing any of the following: - Removing one of the static asserts makes the other one pass. - Making the value of A.a not equal to B.b --
May 27 2016