Mercurial > projects > dstress
changeset 1035:796acf477795
Inheriting nested classes and "-inline" throws access violation
<sky@quit-clan.de>
2006-05-24
news:bug-156-3@http.d.puremagic.com/bugzilla/
author | thomask |
---|---|
date | Thu, 01 Jun 2006 17:50:33 +0000 |
parents | 8a64fe59ff4e |
children | 8006b20664ca |
files | run/i/inline_16_A.d run/i/inline_16_B.d run/i/inline_16_C.d |
diffstat | 3 files changed, 147 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/i/inline_16_A.d Thu Jun 01 17:50:33 2006 +0000 @@ -0,0 +1,49 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ <sky@quit-clan.de> +// @date@ 2006-05-24 +// @uri@ news:bug-156-3@http.d.puremagic.com/bugzilla/ + +module dstress.run.i.inline_16_A; + +int status; + +class Foo{ + class Bar{ + void doSayHello(){ + sayHello(); + } + } + + Bar bar; + + void sayHello(){ + status++; + } + + this(){ + bar = new Bar(); + } +} + +class Foo2 : Foo{ +} + +int main(){ + Foo f = new Foo(); + + if(status != 0){ + assert(0); + } + + f.bar.doSayHello(); + + if(status != 1){ + assert(0); + } + + return 0; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/i/inline_16_B.d Thu Jun 01 17:50:33 2006 +0000 @@ -0,0 +1,49 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ <sky@quit-clan.de> +// @date@ 2006-05-24 +// @uri@ news:bug-156-3@http.d.puremagic.com/bugzilla/ + +module dstress.run.i.inline_16_B; + +int status; + +class Foo{ + class Bar{ + void doSayHello(){ + sayHello(); + } + } + + Bar bar; + + void sayHello(){ + status++; + } + + this(){ + bar = new Bar(); + } +} + +class Foo2 : Foo{ +} + +int main(){ + Foo f = new Foo2(); + + if(status != 0){ + assert(0); + } + + f.bar.doSayHello(); + + if(status != 1){ + assert(0); + } + + return 0; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/i/inline_16_C.d Thu Jun 01 17:50:33 2006 +0000 @@ -0,0 +1,49 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ <sky@quit-clan.de> +// @date@ 2006-05-24 +// @uri@ news:bug-156-3@http.d.puremagic.com/bugzilla/ + +module dstress.run.i.inline_16_C; + +int status; + +class Foo{ + class Bar{ + void doSayHello(){ + sayHello(); + } + } + + Bar bar; + + void sayHello(){ + status++; + } + + this(){ + bar = new Bar(); + } +} + +class Foo2 : Foo{ +} + +int main(){ + Fooi2 f = new Foo2(); + + if(status != 0){ + assert(0); + } + + f.bar.doSayHello(); + + if(status != 1){ + assert(0); + } + + return 0; +} +