Mercurial > projects > dstress
annotate run/o/opEquals_05_D.d @ 1630:d0efa3ae5522 default tip
run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author | David Nadlinger <code@klickverbot.at> |
---|---|
date | Sat, 23 Apr 2011 22:57:32 +0200 |
parents | daef239f37cf |
children |
rev | line source |
---|---|
1107 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ Thomas Kuehne <thomas-dloop@kuehne.cn> | |
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 | 8 // @desc@ [Issue 288] type of opEquals |
9 | |
10 module dstress.run.o.opEquals_05_D; | |
11 | |
12 class C{ | |
13 bool opEquals(Object o){ | |
14 byte* a = cast(byte*) cast(void*) this; | |
15 byte* b = cast(byte*) cast(void*) o; | |
16 | |
17 return a[0 .. C.sizeof] == b[0 .. C.sizeof]; | |
18 } | |
19 } | |
20 | |
21 int main(){ | |
22 bool a = (new C() != new C()); | |
23 | |
24 return 0; | |
25 } |