Bug in D!!!

EntangledQuanta via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Sep 1 11:17:22 PDT 2017


On Friday, 1 September 2017 at 15:24:39 UTC, Adam D. Ruppe wrote:
> static foreach is now in the new release! You can now do stuff 
> like:
>
> ---
> alias I(A...) = A;
>
> interface Foo {
>         static foreach(T; I!(int, float))
>                 void set(T t); // define virt funcs for a list 
> of types
> }
>
> class Ass : Foo {
>         static foreach(T; I!(int, float))
>                 void set(T t) {
>                         // simplement
>                 }
> }
> ---
>
>
> really easily.

I get an access violation, changed the code to

	import std.meta;
	static foreach(T; AliasSeq!("int", "float"))
		mixin("void set("~T~" t);");


and also get an access violation ;/



More information about the Digitalmars-d-learn mailing list