Mercurial > projects > dstress
changeset 518:116be68a7a67
auto_05 is undefined
author | thomask |
---|---|
date | Wed, 11 May 2005 15:19:10 +0000 |
parents | 79242ce0cf34 |
children | 247dc7be9a3b |
files | norun/auto_05.d undefined/auto_05.d |
diffstat | 2 files changed, 28 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/norun/auto_05.d Wed May 11 00:00:56 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -// $HeadURL$ -// $Date$ -// $Author$ - -// @author@ Lionello Lunesu <lio@lunesu.removethis.com> -// @date@ 2005-03-25 -// @uri@ news:d2175a$2u8h$1@digitaldaemon.com - -// __DSTRESS_ELINE__ 23 - -module dstress.norun.auto_05; - -class AutoClass{ - int test() { - return 0; - } -} - -AutoClass b; - -void autotest(){ - auto AutoClass c = new AutoClass(); - b = c; // this should be forbidden -} - -int main(){ - autotest(); - b.test(); // "access violation" - return 0; -}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/undefined/auto_05.d Wed May 11 15:19:10 2005 +0000 @@ -0,0 +1,28 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Lionello Lunesu <lio@lunesu.removethis.com> +// @date@ 2005-03-25 +// @uri@ news:d2175a$2u8h$1@digitaldaemon.com + +module dstress.undefined.auto_05; + +class AutoClass{ + int test() { + return 0; + } +} + +AutoClass b; + +void autotest(){ + auto AutoClass c = new AutoClass(); + b = c; +} + +int main(){ + autotest(); + b.test(); // *undefined* + return 0; +}