annotate run/s/static_if_06_A.d @ 1489:b8c0195059d9

changed nntp: URLs to http: URLs
author thomask
date Mon, 09 Apr 2007 13:47:01 +0000
parents a14f98c3ae83
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
740
a14f98c3ae83 catch-up commit of bug reports
thomask
parents:
diff changeset
1 // $HeadURL$
a14f98c3ae83 catch-up commit of bug reports
thomask
parents:
diff changeset
2 // $Date$
a14f98c3ae83 catch-up commit of bug reports
thomask
parents:
diff changeset
3 // $Author$
a14f98c3ae83 catch-up commit of bug reports
thomask
parents:
diff changeset
4
a14f98c3ae83 catch-up commit of bug reports
thomask
parents:
diff changeset
5 // @author@ Don Clugston <dac@nospam.com.au>
a14f98c3ae83 catch-up commit of bug reports
thomask
parents:
diff changeset
6 // @date@ 2005-11-11
1489
b8c0195059d9 changed nntp: URLs to http: URLs
thomask
parents: 740
diff changeset
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=5391
740
a14f98c3ae83 catch-up commit of bug reports
thomask
parents:
diff changeset
8
a14f98c3ae83 catch-up commit of bug reports
thomask
parents:
diff changeset
9 module dstress.run.s.static_if_06_A;
a14f98c3ae83 catch-up commit of bug reports
thomask
parents:
diff changeset
10
a14f98c3ae83 catch-up commit of bug reports
thomask
parents:
diff changeset
11 template t(int n){
a14f98c3ae83 catch-up commit of bug reports
thomask
parents:
diff changeset
12 static if (n==1) {
a14f98c3ae83 catch-up commit of bug reports
thomask
parents:
diff changeset
13 int a = n + 1;
a14f98c3ae83 catch-up commit of bug reports
thomask
parents:
diff changeset
14 } else {
a14f98c3ae83 catch-up commit of bug reports
thomask
parents:
diff changeset
15 int a = -n;
a14f98c3ae83 catch-up commit of bug reports
thomask
parents:
diff changeset
16 }
a14f98c3ae83 catch-up commit of bug reports
thomask
parents:
diff changeset
17 }
a14f98c3ae83 catch-up commit of bug reports
thomask
parents:
diff changeset
18
a14f98c3ae83 catch-up commit of bug reports
thomask
parents:
diff changeset
19 int main(){
a14f98c3ae83 catch-up commit of bug reports
thomask
parents:
diff changeset
20 mixin t!(2);
a14f98c3ae83 catch-up commit of bug reports
thomask
parents:
diff changeset
21
a14f98c3ae83 catch-up commit of bug reports
thomask
parents:
diff changeset
22 assert(a == -2);
a14f98c3ae83 catch-up commit of bug reports
thomask
parents:
diff changeset
23
a14f98c3ae83 catch-up commit of bug reports
thomask
parents:
diff changeset
24 return 0;
a14f98c3ae83 catch-up commit of bug reports
thomask
parents:
diff changeset
25 }