Multiple alias this is coming.
IgorStepanov via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Thu Sep 18 15:13:13 PDT 2014
On Thursday, 18 September 2014 at 21:29:10 UTC, Nordlöw wrote:
> On Thursday, 18 September 2014 at 11:20:49 UTC, IgorStepanov
> wrote:
>> I've created pull request, which introduces multiple alias
>> this.
>> https://github.com/D-Programming-Language/dmd/pull/3998
>> Please see the additional tests and comment it.
>
> Exciting!
>
> What more good things than a better behaving Nullable(T) with T
> being a polymorphic class will this enable?
Is Nullable!(T) with polymorphic type disallowed now?
This PR also allows to use inherited alias thises:
interface Intable
{
@property int getInt();
}
class Foo : Intable
{
int i;
this (int i)
{
this.i = i;
}
override @property int getInt()
{
return i;
}
}
auto f = new Foo(42);
int i = f; //i now 42
This option was disabled early.
More information about the Digitalmars-d-announce
mailing list