[Issue 20761] __traits(isSame) for alias tuples is broken and underspecified

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jul 4 20:07:25 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=20761

Basile-z <b2.temp at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |b2.temp at gmx.com
           Assignee|nobody at puremagic.com        |b2.temp at gmx.com
           Severity|normal                      |major

--- Comment #1 from Basile-z <b2.temp at gmx.com> ---
this is a cool bug. The fact that this 3rd case passes explains it all:

  static assert(__traits(isSame, AliasSeq!(1, 1), AliasSeq!(2, 2)));

in traits semantic, the two args are actually a list that expands in place to 
(1,1,2,2) and finally what get compared is the two elements of what was the
first trait argument !

awesome bug isn't it !!

--


More information about the Digitalmars-d-bugs mailing list