[Bug 132] class template, alias and class inheritance combo leads to segfault

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed May 10 13:44:57 PDT 2006


http://d.puremagic.com/bugzilla/show_bug.cgi?id=132





------- Comment #3 from benoit at tionex.de  2006-05-10 15:44 -------
(In reply to comment #2)
> Another variant of this bug. Here foo is not part of Bar, it is part of a
> member variable. I guess this bug is very related to #106:
> 
> private import std.stdio;
> class Foo : Bar { }
> class FooT(V){
>     public void foo() {}
> }
> class Bar {
    public this(){
        f = new FooT!(int);
    }
>     FooT!(int) f;
> }
> void main() {
>     Foo fooIt = new Foo();
>     if (fooIt !is null) writefln("fooIt should be valid");
>     fooIt.f.foo();
>     writefln("it worked");
> }
> 

I forgot to post the constructor for initializing the member f, but this
changes nothing with the bug.


-- 




More information about the Digitalmars-d-bugs mailing list