annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1564
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
1 // $HeadURL$
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
2 // $Date$
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
3 // $Author$
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
4
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
5 // @author@ <samukha@voliacable.com>
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
6 // @date@ 2007-09-07
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1532
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
8 // @desc@ [Issue 1532] Template instance cannot use class locals as template parameters
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
9
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
10 module dstress.run.t.template_65_B;
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
11
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
12 class C{
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
13 template T(alias local){
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
14 int T(){
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
15 return local;
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
16 }
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
17 }
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
18
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
19 int foo = 0x12_AB_34_EF;
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
20
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
21 alias T!(foo) bar;
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
22 }
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
23
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
24 int main(){
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
25 C c = new C();
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
26 if(0x12_AB_34_EF != c.bar()){
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
27 assert(0);
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
28 }
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
29 return 0;
1d41f2132ef4 r8717@birke: tk | 2007-09-30 10:45:56 +0200
thomask
parents:
diff changeset
30 }