[Issue 23966] [REG2.102] Cannot use traits(getAttributes) with overloaded template
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jun 13 13:57:23 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23966
RazvanN <razvan.nitu1305 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |razvan.nitu1305 at gmail.com
--- Comment #2 from RazvanN <razvan.nitu1305 at gmail.com> ---
This is not a problem with the deprecation of __traits(getAttributes), but
rather a problem of traits(getOverloads). This was simply exposed by the
deprecation. If you use __traits(getLocation) instead of getAttributes, you
will get the same behavior (except that an error is issued, not a deprecation):
module test;
@("gigi")
void fun() {}
@("mimi")
void fun(int) {}
@("didi")
void fun()(int, ulong) {}
void main()
{
//pragma(msg, __traits(getAttributes, fun));
pragma(msg, __traits(getOverloads, test, "fun"));
static foreach (t; __traits(getOverloads, test, "fun"))
pragma(msg, __traits(getLocation, t));
}
--
More information about the Digitalmars-d-bugs
mailing list