digitalmars.D.bugs - [Bug 156] New: Inheriting nested classes and "-inline" throws access violation
- d-bugmail puremagic.com (49/49) May 24 2006 http://d.puremagic.com/bugzilla/show_bug.cgi?id=156
- Thomas Kuehne (13/48) Jun 01 2006 -----BEGIN PGP SIGNED MESSAGE-----
- Markus Dangl (1/7) Jun 03 2006 Thanks for all the effort you're putting into DStress!
- d-bugmail puremagic.com (9/9) Jun 04 2006 http://d.puremagic.com/bugzilla/show_bug.cgi?id=156
http://d.puremagic.com/bugzilla/show_bug.cgi?id=156
Summary: Inheriting nested classes and "-inline" throws access
violation
Product: D
Version: 0.157
Platform: PC
OS/Version: Windows
Status: NEW
Keywords: wrong-code
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla digitalmars.com
ReportedBy: sky quit-clan.de
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;
}
--
May 24 2006
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 d-bugmail puremagic.com schrieb am 2006-05-24:http://d.puremagic.com/bugzilla/show_bug.cgi?id=156The 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-----
Jun 01 2006
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 ThomasThanks for all the effort you're putting into DStress!
Jun 03 2006
http://d.puremagic.com/bugzilla/show_bug.cgi?id=156
bugzilla digitalmars.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Fixed in DMD 0.160
--
Jun 04 2006









Markus Dangl <danglm in.tum.de> 