Bug 23205 – Can't declare mixin template inside a function
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-06-22T14:17:16Z
Last change time
2022-06-23T08:56:23Z
Keywords
pull
Assigned to
No Owner
Creator
Paul Backus
Comments
Comment #0 by snarwin+bugzilla — 2022-06-22T14:17:16Z
As of DMD 2.100.0, the following program fails to compile:
---
void fun()
{
mixin template tpl() {}
}
---
The error message is
---
bug.d(3): Error: identifier expected, not `template`
bug.d(3): Error: `;` expected after `mixin`
bug.d(3): Error: found `)` instead of statement
bug.d(4): Error: unmatched closing brace
---
Comment #1 by dlang-bot — 2022-06-23T03:56:35Z
@BorisCarvajal created dlang/dmd pull request #14240 "Fix Issue 23205 - Can't declare mixin template inside a function" fixing this issue:
- Fix Issue 23205 - Can't declare mixin template inside a function
https://github.com/dlang/dmd/pull/14240
Comment #2 by dlang-bot — 2022-06-23T08:56:23Z
dlang/dmd pull request #14240 "Fix Issue 23205 - Can't declare mixin template inside a function" was merged into master:
- 4a8b02946d890cc72f49fc8ada09e8c640f11967 by Boris Carvajal:
Fix Issue 23205 - Can't declare mixin template inside a function
https://github.com/dlang/dmd/pull/14240