Mercurial > projects > dstress
annotate run/struct_08.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 | f87ba6507260 |
children |
rev | line source |
---|---|
374 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 module dstress.run.struct_08; | |
0 | 6 |
7 struct MyStruct{ | |
8 int data() { | |
9 return m_data; | |
10 } | |
11 | |
12 void data(int value) { | |
13 m_data = value; | |
14 } | |
15 | |
16 private: | |
17 int m_data; | |
18 } | |
19 | |
20 int main(){ | |
21 MyStruct m; | |
22 | |
23 m.data = 3; | |
24 assert ( m.data == 3); | |
25 | |
26 m.data(5); | |
27 assert ( m.data() == 5); | |
28 | |
29 return 0; | |
30 } |