annotate run/m/mixin_28_A.d @ 1413:16360a39d709

Re: Compile time function execution... Gregor Richards <Richards@codu.org> 2007-02-15 http://www.digitalmars.com/webnews/newsgroups.php?group=digitalmars.D&article_id=48811
author thomask
date Sun, 11 Mar 2007 11:05:50 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1413
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
1 // $HeadURL$
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
2 // $Date$
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
3 // $Author$
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
4
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
5 // @author@ Gregor Richards <Richards@codu.org>
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
6 // @date@ 2007-02-15
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
7 // @uri@ http://www.digitalmars.com/webnews/newsgroups.php?group=digitalmars.D&article_id=48811
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
8 // @desc@ Re: Compile time function execution...
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
9
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
10 module dstress.run.m.mixin_28_A;
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
11
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
12 int state;
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
13
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
14 void bar(){
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
15 state++;
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
16 }
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
17
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
18 char[] foo(){
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
19 return "bar();";
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
20 }
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
21
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
22 int main(){
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
23 if(0 != state){
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
24 assert(0);
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
25 }
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
26
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
27 mixin(foo());
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
28
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
29 if(1 != state){
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
30 assert(0);
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
31 }
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
32 return 0;
16360a39d709 Re: Compile time function execution...
thomask
parents:
diff changeset
33 }