On Sunday, 5 November 2017 at 07:07:43 UTC, Aurelien Fredouelle
wrote:
struct S { }
class A
{
S s;
alias s this;
}
class B : A
{
}
void main()
{
A asA = new B;
B asB = cast(B)asA;
}
I would expect the last line to successfully cast the B
instance I created back into type B, however t
The following code does not compile:
struct S { }
class A
{
S s;
alias s this;
}
class B : A
{
}
void main()
{
A asA = new B;
B asB = cast(B)asA;
}
I would expect the last line to successfully cast the B instance
I created back into type B, however this seems to be preempted by
the