issue with static foreach

Paul Backus snarwin at gmail.com
Thu Jul 22 18:06:07 UTC 2021


On Thursday, 22 July 2021 at 17:38:09 UTC, Tejas wrote:
> Why does this work?
>
> ```d
> import std;
> void main()
> {
>     mixin("int") a;
>     writeln(a);
> }
> ```

You can mix in a type:

https://dlang.org/spec/type.html#mixin_types


More information about the Digitalmars-d-learn mailing list