annotate run/o/opEquals_05_D.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 afccd35b0bd3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1107
afccd35b0bd3 [Issue 288] type of opEquals
thomask
parents:
diff changeset
1 // $HeadURL$
afccd35b0bd3 [Issue 288] type of opEquals
thomask
parents:
diff changeset
2 // $Date$
afccd35b0bd3 [Issue 288] type of opEquals
thomask
parents:
diff changeset
3 // $Author$
afccd35b0bd3 [Issue 288] type of opEquals
thomask
parents:
diff changeset
4
afccd35b0bd3 [Issue 288] type of opEquals
thomask
parents:
diff changeset
5 // @author@ Thomas Kuehne <thomas-dloop@kuehne.cn>
afccd35b0bd3 [Issue 288] type of opEquals
thomask
parents:
diff changeset
6 // @date@ 2006-08-15
1320
daef239f37cf sed'ed replacement of new:...http.d.puremagic.com/issues/ with http://d.puremagic.com/issues/show_bug.cgi?...
thomask
parents: 1107
diff changeset
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=288
1107
afccd35b0bd3 [Issue 288] type of opEquals
thomask
parents:
diff changeset
8 // @desc@ [Issue 288] type of opEquals
afccd35b0bd3 [Issue 288] type of opEquals
thomask
parents:
diff changeset
9
afccd35b0bd3 [Issue 288] type of opEquals
thomask
parents:
diff changeset
10 module dstress.run.o.opEquals_05_D;
afccd35b0bd3 [Issue 288] type of opEquals
thomask
parents:
diff changeset
11
afccd35b0bd3 [Issue 288] type of opEquals
thomask
parents:
diff changeset
12 class C{
afccd35b0bd3 [Issue 288] type of opEquals
thomask
parents:
diff changeset
13 bool opEquals(Object o){
afccd35b0bd3 [Issue 288] type of opEquals
thomask
parents:
diff changeset
14 byte* a = cast(byte*) cast(void*) this;
afccd35b0bd3 [Issue 288] type of opEquals
thomask
parents:
diff changeset
15 byte* b = cast(byte*) cast(void*) o;
afccd35b0bd3 [Issue 288] type of opEquals
thomask
parents:
diff changeset
16
afccd35b0bd3 [Issue 288] type of opEquals
thomask
parents:
diff changeset
17 return a[0 .. C.sizeof] == b[0 .. C.sizeof];
afccd35b0bd3 [Issue 288] type of opEquals
thomask
parents:
diff changeset
18 }
afccd35b0bd3 [Issue 288] type of opEquals
thomask
parents:
diff changeset
19 }
afccd35b0bd3 [Issue 288] type of opEquals
thomask
parents:
diff changeset
20
afccd35b0bd3 [Issue 288] type of opEquals
thomask
parents:
diff changeset
21 int main(){
afccd35b0bd3 [Issue 288] type of opEquals
thomask
parents:
diff changeset
22 bool a = (new C() != new C());
afccd35b0bd3 [Issue 288] type of opEquals
thomask
parents:
diff changeset
23
afccd35b0bd3 [Issue 288] type of opEquals
thomask
parents:
diff changeset
24 return 0;
afccd35b0bd3 [Issue 288] type of opEquals
thomask
parents:
diff changeset
25 }