[Issue 499] New: Multiple overrides of the destructor when using signals
Bill Baxter
wbaxter at gmail.com
Mon Nov 13 09:05:36 PST 2006
d-bugmail at puremagic.com wrote:
> http://d.puremagic.com/issues/show_bug.cgi?id=499
>
> Summary: Multiple overrides of the destructor when using signals
> Product: D
> Version: 0.173
> Platform: PC
> OS/Version: Windows
> Status: NEW
> Severity: blocker
> Priority: P2
> Component: DMD
> AssignedTo: bugzilla at digitalmars.com
> ReportedBy: maxter at i.com.ua
>
>
> The following gives 'test.d(233): function test.Test.Signal!(Args)._dtor
> multiple overrides of same function':
>
> import std.stdio, std.signals;
>
> class Args
> {
> int foo;
> }
>
> class Base
> {
> ~this()
> {
> writefln("Base dtor!");
> }
> }
>
> class Test : Base
> {
> mixin Signal!(Args) A;
> mixin Signal!(Args) B;
>
> ~this()
> {
> writefln("Test dtor");
> }
> }
>
>
> void main()
> {
> auto test = new Test;
> }
>
> //------------------------------
>
> The code compiles ok, if there is no base class or no destructor in the base
> class.
>
>
This is already fixed in the version of std.signals here:
http://www.digitalmars.com/d/phobos/signals.d
--bb
More information about the Digitalmars-d-bugs
mailing list