Mercurial > projects > dstress
annotate run/s/struct_initialization_08_B.d @ 1320:daef239f37cf
sed'ed replacement of new:...http.d.puremagic.com/issues/ with http://d.puremagic.com/issues/show_bug.cgi?...
author | thomask |
---|---|
date | Sun, 31 Dec 2006 19:59:08 +0000 |
parents | e8cc5e77c457 |
children |
rev | line source |
---|---|
1252
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
1 // $HeadURL$ |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
2 // $Date$ |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
3 // $Author$ |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
4 |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
5 // @author@ David Friedman <dvdfrdmn@users.sf.net> |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
6 // @date@ 2006-12-07 |
1320
daef239f37cf
sed'ed replacement of new:...http.d.puremagic.com/issues/ with http://d.puremagic.com/issues/show_bug.cgi?...
thomask
parents:
1252
diff
changeset
|
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=661 |
1252
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
8 // @desc@ [Issue 661] New: Error using a zero-init struct's init property |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
9 |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
10 module dstress.run.s.struct_initialization_08_B; |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
11 |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
12 struct S { |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
13 float x = 12.34f; |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
14 } |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
15 |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
16 int main() { |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
17 S s; |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
18 s.x = 1.0f; |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
19 |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
20 s = s.init; |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
21 |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
22 if(s.x != 12.3f){ |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
23 assert(0); |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
24 } |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
25 |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
26 return 0; |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
27 } |