Mercurial > projects > dstress
annotate nocompile/invariant_16.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 | ec5e144583ea |
children |
rev | line source |
---|---|
374 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // invariant is only allowed in class/union/struct (dmd-0.119 documentation) | |
6 | |
7 // __DSTRESS_ELINE__ 13 | |
66 | 8 |
9 module dstress.nocompile.invariant_16; | |
10 | |
11 interface MyInterface{ | |
12 private int check(); | |
1559 | 13 invariant(){ |
66 | 14 assert(check()!=4); |
15 } | |
16 } | |
17 class MyClass : MyInterface { | |
18 void test(){ | |
19 } | |
20 | |
21 private int check(){ | |
22 return 4; | |
23 } | |
24 } | |
25 | |
26 int main(){ | |
27 Myclass c = new MyClass(); | |
28 c.test(); | |
29 return 0; | |
30 } |