[Issue 23205] New: Can't declare mixin template inside a function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jun 22 14:17:16 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=23205
Issue ID: 23205
Summary: Can't declare mixin template inside a function
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: snarwin+bugzilla at gmail.com
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
---
--
More information about the Digitalmars-d-bugs
mailing list