Mercurial > projects > dstress
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 |
rev | line source |
---|---|
740 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ Don Clugston <dac@nospam.com.au> | |
6 // @date@ 2005-11-11 | |
1489 | 7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=5391 |
740 | 8 |
9 module dstress.run.s.static_if_06_A; | |
10 | |
11 template t(int n){ | |
12 static if (n==1) { | |
13 int a = n + 1; | |
14 } else { | |
15 int a = -n; | |
16 } | |
17 } | |
18 | |
19 int main(){ | |
20 mixin t!(2); | |
21 | |
22 assert(a == -2); | |
23 | |
24 return 0; | |
25 } |