Mercurial > projects > dstress
changeset 369:0192f18b7ff6
auto out of scope
Lionello Lunesu <lio@lunesu.removethis.com>
2005-03-25
news:d2175a$2u8h$1@digitaldaemon.com
author | thomask |
---|---|
date | Sat, 26 Mar 2005 07:27:46 +0000 |
parents | 7bc0cb26b7bb |
children | 2e7e260384a4 |
files | norun/auto_05.d |
diffstat | 1 files changed, 30 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/norun/auto_05.d Sat Mar 26 07:27:46 2005 +0000 @@ -0,0 +1,30 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Lionello Lunesu <lio@lunesu.removethis.com> +// @date@ 2005-03-25 +// @uri@ news:d2175a$2u8h$1@digitaldaemon.com + +// __DSTRESS_ELINE__ 27 + +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 1; +} \ No newline at end of file