Mercurial > projects > dstress
comparison run/return_06.d @ 1380:902d2c168029
updates for DMD-1.007
author | thomask |
---|---|
date | Sun, 04 Mar 2007 11:01:08 +0000 |
parents | 9a121126b077 |
children |
comparison
equal
deleted
inserted
replaced
1379:f4ba482f309c | 1380:902d2c168029 |
---|---|
1 // $HeadURL$ | 1 // $HeadURL$ |
2 // $Date$ | 2 // $Date$ |
3 // $Author$ | 3 // $Author$ |
4 | |
5 // @author@ Thomas Kühne <thomas-dloop@kuehne.cn> | |
6 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=727 | |
7 // @desc@ [Issue 727] -inline: missing return in short function causes incorrect code generation | |
4 | 8 |
5 // __DSTRESS_TORTURE_BLOCK__ -release | 9 // __DSTRESS_TORTURE_BLOCK__ -release |
6 | 10 |
7 module dstress.run.return_06; | 11 module dstress.run.return_06; |
8 | 12 |
11 return 2; | 15 return 2; |
12 } | 16 } |
13 } | 17 } |
14 | 18 |
15 int main(){ | 19 int main(){ |
16 assert(test(0)==2); | 20 if(2 != test(0)){ |
21 assert(0); | |
22 } | |
23 | |
17 try{ | 24 try{ |
18 test(1); | 25 test(1); |
19 }catch{ | 26 }catch{ |
20 return 0; | 27 return 0; |
21 } | 28 } |