Debian Codegraph @

gcc/testsuite/gdc.test/compilable/test20821.d

raw
1 // https://issues.dlang.org/show_bug.cgi?id=20821
2
3 struct S
4 {
5 int gun()(int i) { return 0; }
6 alias fun = gun;
7 int fun() { return 1; }
8
9 static int sgun()(int i) { return 0; }
10 alias sfun = sgun;
11 static int sfun() { return 1; }
12 }
13
14 static assert(S().fun == 1); // expressionsem.d changes
15 static assert(S.sfun == 1); // ditto
16
17 static assert(__traits(getOverloads, S, "fun", true).length == 2); // traits.d changes