Mercurial > projects > dstress
annotate run/const_16.d @ 1597:8b9d4d2f925a
Fix typos in complex tests. See D bug 614.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Tue, 09 Sep 2008 16:53:58 +0200 |
parents | b8c0195059d9 |
children |
rev | line source |
---|---|
347 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ Stewart Gordon <smjg_1998@yahoo.com> | |
6 // @date@ 2005-03-21 | |
1489 | 7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=3290 |
347 | 8 |
9 module dstress.run.const_16; | |
10 | |
11 struct StructA{ | |
12 int a; | |
13 } | |
14 | |
15 const int i = 15; | |
16 | |
17 const StructA s1 = { i+1 }; | |
435 | 18 const StructA s2 = s1; |
347 | 19 |
20 int main(){ | |
21 assert(s1.a == 16); | |
22 assert(s2.a == 16); | |
23 return 0; | |
24 } |