Mercurial > projects > dstress
comparison run/t/template_65_B.d @ 1564:1d41f2132ef4
r8717@birke: tk | 2007-09-30 10:45:56 +0200
[Issue 1532] Template instance cannot use class locals as template parameters
<samukha@voliacable.com>
2007-09-07
http://d.puremagic.com/issues/show_bug.cgi?id=1532
author | thomask |
---|---|
date | Sun, 30 Sep 2007 09:46:24 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1563:17cb36e8f9ae | 1564:1d41f2132ef4 |
---|---|
1 // $HeadURL$ | |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ <samukha@voliacable.com> | |
6 // @date@ 2007-09-07 | |
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1532 | |
8 // @desc@ [Issue 1532] Template instance cannot use class locals as template parameters | |
9 | |
10 module dstress.run.t.template_65_B; | |
11 | |
12 class C{ | |
13 template T(alias local){ | |
14 int T(){ | |
15 return local; | |
16 } | |
17 } | |
18 | |
19 int foo = 0x12_AB_34_EF; | |
20 | |
21 alias T!(foo) bar; | |
22 } | |
23 | |
24 int main(){ | |
25 C c = new C(); | |
26 if(0x12_AB_34_EF != c.bar()){ | |
27 assert(0); | |
28 } | |
29 return 0; | |
30 } |