← Back to index
|
Original Bugzilla link
Bug 19506 – mixin template should be able to inject code as well as symbols
Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-12-22T09:46:27Z
Last change time
2024-12-13T19:01:42Z
Keywords
spec
Assigned to
No Owner
Creator
Nicholas Wilson
Moved to GitHub: dmd#19519 →
Comments
Comment #0
by iamthewilsonator — 2018-12-22T09:46:27Z
Works --- mixin template foo(bool b) { int _impl() { writeln(b); return int.init; } int _ipml2 = _impl(); } void main() { mixin foo; } --- doesn't --- mixin template foo(bool b) { writeln(b); } void main() { mixin foo; } --- see
https://forum.dlang.org/post/
[email protected]
for the discovery of this idiom
Comment #1
by robert.schadek — 2024-12-13T19:01:42Z
THIS ISSUE HAS BEEN MOVED TO GITHUB
https://github.com/dlang/dmd/issues/19519
DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB