https://issues.dlang.org/show_bug.cgi?id=19682
Issue ID: 19682
Summary: Unused alias causes @nogc error
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
```d
@nogc:
void foo(alias cb)() {}
void main() {
int x = 0;
foo!(() => x)();
}
```
I would expect the code to compile since the closure is inside an alias.
The code does compile if I change `foo` to `void foo(alias cb)() { cb(); }`.
--