[Issue 19237] string mixin struct initializer doesn't compile

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 12 20:18:43 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=19237

Basile-z <b2.temp at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |b2.temp at gmx.com
         Resolution|---                         |DUPLICATE

--- Comment #1 from Basile-z <b2.temp at gmx.com> ---
arrays work but not in the path you think it actually does.

  auto a = mixin("[0]");

gives an "ExpInitializer" made of a "MixinExpression", which contains some code
for a "PrimaryExp" that's a "ArrayLiteral".


  S s = mixin("{0}");

Is rejected because "StructInitializer" is not a primary exp.

When can see then that the requested feature is then part of a bigger project,
that if done, handles also this specific case.

*** This issue has been marked as a duplicate of issue 15692 ***

--


More information about the Digitalmars-d-bugs mailing list