In what order static if conditions are evaluated?

Timon Gehr timon.gehr at gmx.ch
Fri Mar 29 08:26:12 PDT 2013


On 03/29/2013 03:25 PM, "Artur Zawłocki" <artur.zawlocki at gmail.com>" wrote:
> ...
>
> Knowing the parent of D is not required to create an instance of D?
>...

In this case it is not necessary. The restriction will be introduced 
later. (I have not implemented super constructor calls yet. They will 
make it break down, because in general the subclass cannot know that the 
unknown super class does not define a constructor.)

This is a simpler case that possibly illustrates my actual point better:

class A{ alias int string; }

template Mixin(string s){
     mixin("alias "~s~" Mixin;");
}

class B : Mixin!(B.x){
	immutable string x = "A";
}

This still crashes DMD.


More information about the Digitalmars-d mailing list