annotate run/bug_cgcs_353_C.d @ 435:ec6d35cccfb5

pre dmd-0.121 review Walter <walter@digitalmars.com> 2005-04-15 mail:000e01c54203$22c0e850$0200a8c0@colossus
author thomask
date Sat, 16 Apr 2005 08:18:57 +0000
parents c1c92aab770e
children 32f7f8ce5e51
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
300
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
1 // $HeadURL$
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
2 // $Date$
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
3 // $Author$
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
4
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
5 // @author@ Ben Hinkle <ben.hinkle@gmail.com>
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
6 // @date@ 2005-03-01
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
7 // @uri@ news:d00fr5$17dc$1@digitaldaemon.com
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
8 // @url@ nntp://news.digitalmars.com/digitalmars.D.bugs/3068
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
9
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
10 module dstress.run.bug_cgcs_353_C;
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
11
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
12 struct MyStruct {
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
13 int opEquals(MyStruct x) {
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
14 return this.normalize === x.normalize;
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
15 }
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
16
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
17 MyStruct normalize() {
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
18 return s;
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
19 }
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
20 }
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
21
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
22 MyStruct s;
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
23
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
24 int main() {
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
25 MyStruct a;
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
26 MyStruct b;
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
27 assert(a==b);
435
ec6d35cccfb5 pre dmd-0.121 review
thomask
parents: 300
diff changeset
28 assert(&a!=&b);
300
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
29 return 0;
435
ec6d35cccfb5 pre dmd-0.121 review
thomask
parents: 300
diff changeset
30 }