dmd/compiler/test/compilable/uda.d
Max Haughton 4b4975f51d
Fix Issue 23241 - Consider types with no symbol (e.g. int) to have no… (#14298)
* Fix Issue 23241 - Consider types with no symbol (e.g. int) to have no attributes

* Update compiler/src/dmd/traits.d

Co-authored-by: Iain Buclaw <ibuclaw@gdcproject.org>

Co-authored-by: Iain Buclaw <ibuclaw@gdcproject.org>
2022-07-27 10:58:28 +03:00

14 lines
393 B
D

/************************************************/
// https://issues.dlang.org/show_bug.cgi?id=15180
// [REG2.069.0-b1] Segfault with empty struct used as UDA
struct foo { }
@foo bar () { }
/************************************************/
// https://issues.dlang.org/show_bug.cgi?id=23241
alias feynman = int;
enum get = __traits(getAttributes, feynman);
static assert(get.length == 0);