Here is the test code
```d
import std.stdio;
import std.traits;
void main() {
const s1 = getUDAs!(__traits(getMember, User, "age"), Max)[0].stringof;
const s2 = (getUDAs!(__traits(getMember, User, "age"), Max)[0]).stringof;
writefln("s1=%s", s1);
writefln("s2=%s", s2);
}
class User {
@Max()
// @Max
int age;
}
struct Max {
long value;
string message = "must be less than or equal to {{value}}";
}
```
The output from DMD 2.106.1 is
```txt
s1=Max(0L, "must be less than or equal to {{value}}")
s2=arg
```
The output from DMD 2.095.1 is
```txt
s1=Max(0L, "must be less than or equal to {{value}}")
s2=Max(0L, "must be less than or equal to {{value}}")
```
The problem is that the s2 for DMD 2.106.1 got a wrong result.
Comment #1 by robert.schadek — 2024-12-01T16:42:14Z