[Issue 23966] New: [REG2.102] Cannot use traits(getAttributes) with overloaded template
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jun 4 19:30:47 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23966
Issue ID: 23966
Summary: [REG2.102] Cannot use traits(getAttributes) with
overloaded template
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: johanengelen at weka.io
Testcase:
```
module test;
@("gigi")
void fun() {}
@("mimi")
void fun(int) {}
void fun()(int, ulong) {}
void main()
{
static foreach (t; __traits(getOverloads, test, "fun"))
static foreach(attr; __traits(getAttributes, t))
pragma(msg, attr);
}
```
This no longer works with dlang 2.102, even though the release notes say that
this is correct code.
https://dlang.org/changelog/2.102.0.html#dmd.deprecate-getAttributes-overloadSet
It errors on the fun()(...) template.
--
More information about the Digitalmars-d-bugs
mailing list