750
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 // @author@ Don Clugston <dac@nospam.com.au>
|
|
6 // @date@ 2005-11-14
|
1489
|
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=5463
|
750
|
8
|
|
9 module dstress.run.t.template_18_B;
|
|
10
|
|
11 template outside(alias s){
|
|
12 const int outval = s.localval;
|
|
13 }
|
|
14
|
|
15 template test(alias f){
|
|
16 template local(){
|
|
17 const int localval = f.x;
|
|
18 }
|
|
19
|
|
20 const int val = outside!(local!()).outval;
|
|
21 }
|
|
22
|
|
23 template a(){
|
|
24 const int x = 123;
|
|
25 }
|
|
26
|
|
27 int main(){
|
|
28 static assert( test!( a!() ).val == 123);
|
|
29
|
|
30 return 0;
|
|
31 }
|
|
32
|