https://issues.dlang.org/show_bug.cgi?id=15824
Issue ID: 15824
Summary: 'scope' attribute ignored when making an alias to a
scope delegate
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
The following code fails to compile:
```
alias scope void delegate() AltDg;
void foo (AltDg dg) @nogc {}
void main () @nogc {
uint i;
foo(() { i = 1; });
}
```
Error message:
`foo.d(4): Error: function D main @nogc function allocates a closure with the
GC`
Using `void foo (scope AltDg dg) @nogc {}` works fine.
--