Mercurial > projects > dstress
comparison run/t/template_65_D.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_D; | |
11 | |
12 struct S{ | |
13 template T(alias local){ | |
14 int T(){ | |
15 return local; | |
16 } | |
17 } | |
18 | |
19 int foo(){ | |
20 return 0x12_AB_34_EF; | |
21 } | |
22 | |
23 alias T!(foo) bar; | |
24 } | |
25 | |
26 int main(){ | |
27 S s; | |
28 if(0x12_AB_34_EF != s.bar()){ | |
29 assert(0); | |
30 } | |
31 return 0; | |
32 } |