Bug 20305 – String mixins fail for structs with 'alias this'

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2019-10-17T18:04:21Z
Last change time
2024-12-13T19:05:54Z
Assigned to
No Owner
Creator
Max Samukha
Moved to GitHub: dmd#19630 →

Comments

Comment #0 by maxsamukha — 2019-10-17T18:04:21Z
struct S { string s = "{}"; alias s this; } void main() { static assert(S() == "{}"); //ok mixin(S()); // fail } onlineapp.d-mixin-8(8): Error: found End of File when expecting ; following statement https://run.dlang.io/is/r9gRMm The spec vaguely states that the string mixin arguments "must be representable as a string". "representable" should be specified.
Comment #1 by robert.schadek — 2024-12-13T19:05:54Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19630 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB