annotate run/bug_cgcs_353_C.d @ 1384:d3a3e0c251d8

nntp: -> http:
author thomask
date Sun, 04 Mar 2007 13:10:07 +0000
parents 52c9e86b6486
children ec5e144583ea
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
1384
d3a3e0c251d8 nntp: -> http:
thomask
parents: 1383
diff changeset
8 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=3068
300
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) {
570
32f7f8ce5e51 updated "===" -> "is" and "!==" to "!(...===...)"
thomask
parents: 435
diff changeset
14 return this.normalize is x.normalize;
300
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 }