July 24 [Issue 24678] New: mixin does not work with interpolated strings | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24678 Issue ID: 24678 Summary: mixin does not work with interpolated strings Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: qs.il.paperinik@gmail.com The following should work: ```d const name = "x"; mixin(iq{int $(name) = 10;}); ``` But it fails because `mixin` has no understanding of interpolated strings and requires (among other alternatives) appending `.text` to every `i` string literal, which requires a needless `import` and thus a dependency. String mixin and interpolated strings are core-language features and those should work together. -- |
Copyright © 1999-2021 by the D Language Foundation