Debian Codegraph @

gcc/testsuite/gdc.test/runnable/pubprivtmpl.d

raw
1 // EXTRA_SOURCES: imports/pubprivtmpla.d
2
3 module pubprivtmpl;
4
5 // Idiom: public alias to private template
6 // This idiom was discovered while refactoring access.d. The idiom was not being used in any DLang repository
7 // but was being used by a few projects in the D ecosystem. It is unkown at this time if this idiom is permitted
8 // by design or by accident. This test was added to DMD to prevent regressions in those projects that utilize this
9 // idiom. See also:
10 // https://issues.dlang.org/show_bug.cgi?id=4533
11 // https://issues.dlang.org/show_bug.cgi?id=11173
12
13 import pubprivtmpla;
14
15 void main()
16 {
17 auto s = S();
18 auto v = s.get();
19 assert(v == 42);
20 }