https://issues.dlang.org/show_bug.cgi?id=21803
Issue ID: 21803
Summary: "@nogc:" incorrectly propagates into function blocks
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
This compiles successfully:
struct S {
@nogc
void f() {
scope dlg = { new int; };
}
}
Whereas this doesn't, because it complains the "new" violates @nogc.
struct T {
@nogc:
void f() {
scope dlg = { new int; };
}
}
--