[Issue 20458] CRTP + pass alias to virtual member to mixin = runtime crash

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Mar 22 23:25:40 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=20458

--- Comment #2 from Basile-z <b2.temp at gmx.com> ---
reduced further

```
mixin template Impl(T){
    alias a =  __traits(getMember, T, "test");
    //alias a = T.test; // no vtbl corruption with this alias
}

class A(T) {
    mixin Impl!T;
}

class Foo : A!Foo {
    void test() {}
}

void main() {
    (new Foo).test();
}    
```

--


More information about the Digitalmars-d-bugs mailing list