digitalmars.D.bugs - [Issue 18106] New: nogc: yields a wrong error where nogc on each
- d-bugmail puremagic.com (22/22) Dec 20 2017 https://issues.dlang.org/show_bug.cgi?id=18106
https://issues.dlang.org/show_bug.cgi?id=18106 Issue ID: 18106 Summary: nogc: yields a wrong error where nogc on each definition does not Product: D Version: D2 Hardware: All URL: http://dlang.org/ OS: All Status: NEW Severity: major Priority: P3 Component: dmd Assignee: nobody puremagic.com Reporter: eyal weka.io This compiles correctly: auto ignoreDlg(void function() dlg) {} nogc void foo() { ignoreDlg({ new int(5); }); } But this gives an incorrect error about the "new" violating nogc: auto ignoreDlg(void function() dlg) {} nogc: void foo() { ignoreDlg({ new int(5); }); } --
Dec 20 2017