https://issues.dlang.org/show_bug.cgi?id=20305
Issue ID: 20305
Summary: String mixins fail for structs with 'alias this'
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
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.
--