annotate run/bug_cgcs_353_C.d @ 1559:ec5e144583ea

D1 -> D2 : 1/N
author thomask
date Sun, 19 Aug 2007 19:11:54 +0000
parents d3a3e0c251d8
children
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;
1559
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1384
diff changeset
27 if(b != a){
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1384
diff changeset
28 assert(0);
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1384
diff changeset
29 }
435
ec6d35cccfb5 pre dmd-0.121 review
thomask
parents: 300
diff changeset
30 assert(&a!=&b);
300
c1c92aab770e cgcs.c 353
thomask
parents:
diff changeset
31 return 0;
435
ec6d35cccfb5 pre dmd-0.121 review
thomask
parents: 300
diff changeset
32 }