mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00

* Fix Issue 23951 - traits(getMember) does not follow alias this * Fix Issue 23279 - ICE when using traits(hasMember) with an erroneous member
10 lines
357 B
D
10 lines
357 B
D
// https://issues.dlang.org/show_bug.cgi?id=23951
|
|
|
|
struct S { int x; }
|
|
struct T { S a; alias a this; }
|
|
struct U { T t; }
|
|
static assert(__traits(hasMember, T, "x"));
|
|
static assert(__traits(hasMember, T.init, "x"));
|
|
static assert(__traits(hasMember, U.init.t, "x"));
|
|
static assert(__traits(hasMember, U.t, "a"));
|
|
static assert(__traits(hasMember, U.t, "x"));
|