111
|
1 // @author@ Patrick Down <Patrick_member@pathlink.com>
|
|
2 // @date@ 2004-06-20
|
|
3 // @uri@ news://cb346n$1uk0$1@digitaldaemon.com
|
|
4 // @url@ nttp://digitalmars.com/digitalmars.D.bugs:565
|
|
5
|
|
6 module dstress.nocompile.template_06;
|
|
7
|
|
8 template foo(Type, alias Func){
|
|
9 int foo(Type t){
|
|
10 return Func(t);
|
|
11 }
|
|
12 }
|
|
13
|
|
14 template foo(Type){
|
|
15 int foo(Type t){
|
|
16 static int f(Type a){
|
|
17 return a;
|
|
18 }
|
|
19 return foo!(Type, f)(t);
|
|
20 }
|
|
21 }
|
|
22
|
|
23 int main(){
|
|
24 printf("%d\n",foo!(int)(1));
|
|
25 return 0;
|
|
26 }
|
|
27
|