[Bug 156] New: Inheriting nested classes and "-inline" throws access violation

Thomas Kuehne thomas-dloop at kuehne.cn
Thu Jun 1 10:57:24 PDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

d-bugmail at puremagic.com schrieb am 2006-05-24:
> http://d.puremagic.com/bugzilla/show_bug.cgi?id=156

> The following code throws an access violation when compiled with "-inline". It
> works fine with other compiler flags.
>
> ------------------------------------------
>
> module nestedclass2;
>
> private import std.stdio;
>
> class Foo
> {
>     class Bar
>     {
>         void doSayHello()
>         {
>             sayHello();
>         }
>     }
>     Bar bar;
>
>     void sayHello()
>     {
>         writefln("Hello");
>     }
>
>     this()
>     {
>         bar = new Bar();
>     }
> }
>
> class Foo2 : Foo
> {
> }
>
> int main(char[][] argv)
> {
>     Foo2 foo = new Foo2();
>     writefln("This should print Hello:");
>     foo.bar.doSayHello();
>
>     return 0;
> }

Added to DStress as
http://dstress.kuehne.cn/run/i/inline_16_A.d
http://dstress.kuehne.cn/run/i/inline_16_B.d
http://dstress.kuehne.cn/run/i/inline_16_C.d

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFEftt63w+/yD4P9tIRAkzgAKDIg5OyM+oKNhZq9jtxltkDav1b/QCgqL4t
UDmyCG1+u0bYJYkDVmKJQlc=
=XrOb
-----END PGP SIGNATURE-----



More information about the Digitalmars-d-bugs mailing list