140
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
111
|
5 // @author@ Patrick Down <Patrick_member@pathlink.com>
|
|
6 // @date@ 2004-06-20
|
140
|
7 // @uri@ news:cb346n$1uk0$1@digitaldaemon.com
|
1485
|
8 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=565
|
111
|
9
|
|
10 module dstress.nocompile.template_06;
|
|
11
|
|
12 template foo(Type, alias Func){
|
|
13 int foo(Type t){
|
|
14 return Func(t);
|
|
15 }
|
|
16 }
|
|
17
|
|
18 template foo(Type){
|
|
19 int foo(Type t){
|
|
20 static int f(Type a){
|
|
21 return a;
|
|
22 }
|
|
23 return foo!(Type, f)(t);
|
|
24 }
|
|
25 }
|
|
26
|
|
27 int main(){
|
743
|
28 foo!(int)(1);
|
111
|
29 return 0;
|
|
30 }
|
|
31
|