diff options
Diffstat (limited to 'gcc/testsuite/gdc.test/compilable/testtempl2.d')
-rw-r--r-- | gcc/testsuite/gdc.test/compilable/testtempl2.d | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.test/compilable/testtempl2.d b/gcc/testsuite/gdc.test/compilable/testtempl2.d new file mode 100644 index 00000000000..57832d9694a --- /dev/null +++ b/gcc/testsuite/gdc.test/compilable/testtempl2.d @@ -0,0 +1,24 @@ +class C +{ + int m; + auto fun() + { + inc!m(); + new N!m; + } +} + +auto inc(alias m)() +{ + ++m; +} + +class N(alias m) +{ +} + +void main() +{ + auto c = new C; + c.new N!(c.m); +} |