Hello
I was just exploring possibility to mimic multiple inheritance
from C++ (do not ask why, just for fun).
I've stumbled on below issue (let's say corner case) and most
likely this is bug in implementation of template Proxy, isn't it ?
import std.typecons;
class IA {}
class IB {}
class C : IB {
IA a;
mixin Proxy!a;
public this() {
a = new IA;
}
}
void main() {
C c = new C;
IA a = cast(IA)c;
IB b_ok = c;
IB b_not_ok = cast(IB)c;
assert(c !is null);
assert(a !is null);
assert(b_ok !is null);
assert(b_not_ok !is null); //fails
}