Mercurial > projects > dstress
comparison run/i/init_06_B.d @ 1539:eb6a99028b95
[Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
Frits van Bommel <fvbommel@wxs.nl>
2007-06-12
http://d.puremagic.com/issues/show_bug.cgi?id=1262
author | thomask |
---|---|
date | Sun, 01 Jul 2007 13:17:11 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1538:5530980c0d49 | 1539:eb6a99028b95 |
---|---|
1 // $HeadURL$ | |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ Frits van Bommel <fvbommel@wxs.nl> | |
6 // @date@ 2007-06-12 | |
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1262 | |
8 // @desc@ [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init | |
9 | |
10 module dstress.run.i.init_06_B; | |
11 | |
12 struct S { | |
13 int x; | |
14 } | |
15 | |
16 int main() { | |
17 S s = S(10); | |
18 | |
19 if (s == S.init){ | |
20 assert(0); | |
21 }else if(10 != s.x){ | |
22 assert(0); | |
23 } | |
24 | |
25 return 0; | |
26 } |