annotate run/f/function_05_F.d @ 1586:a74f0139fc3d

Fix tests using typeof on types.
author Christian Kamm <kamm incasoftware de>
date Thu, 21 Aug 2008 15:42:21 +0200
parents 81222734adf3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
928
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
1 // $HeadURL$
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
2 // $Date$
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
3 // $Author$
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
4
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
5 // @author@ <benoit@tionex.de>
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
6 // @date@ 2006-03-09
1319
81222734adf3 sed'ed replacement of new:...http.d.puremagic.co... with http://d.puremagic.com/issues/show_bug.cgi?...
thomask
parents: 928
diff changeset
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=30
928
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
8
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
9 module dstress.run.f.function_05_F;
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
10
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
11 class C{
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
12 }
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
13
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
14 C createC(){
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
15 return new C();
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
16 }
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
17
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
18 alias C function() aliasFunc;
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
19
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
20 C func(aliasFunc f){
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
21 return f();
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
22 }
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
23
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
24 int main(){
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
25 if(!func(&createC)){
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
26 assert(0);
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
27 }
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
28
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
29 return 0;
ecd311c97f12 <benoit@tionex.de>
thomask
parents:
diff changeset
30 }