[Issue 21740] Typeof mixin regression with v2.096
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Mar 21 19:39:18 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21740
--- Comment #11 from kinke <kinke at gmx.net> ---
Ah, so the point is to allow stuff like `mixin((() => "1")(), " + ", 2)` too:
https://dlang.org/spec/expression.html#mixin_expressions
So with void expressions now being represented as "cast(void)0" strings instead
of "<void>", there's a chance that a previously invalid mixin with some void
expression argument doesn't fail anymore.
Do type arguments make a lot of sense for mixin expressions? `mixin("int") d =
3;` works fine; `mixin(int) d = 3;` yields:
Error: found `)` when expecting `.` following int
Error: found `;` when expecting `)`
Error: no identifier for declarator `mixin((int).d = 3)`
--
More information about the Digitalmars-d-bugs
mailing list