digitalmars.D.bugs - [Issue 11866] New: ` safe` and `nothrow` attributes aren't inferred for nested functions in templated functions
- d-bugmail puremagic.com (37/37) Jan 05 2014 https://d.puremagic.com/issues/show_bug.cgi?id=11866
- d-bugmail puremagic.com (11/11) Jan 05 2014 https://d.puremagic.com/issues/show_bug.cgi?id=11866
https://d.puremagic.com/issues/show_bug.cgi?id=11866 Summary: ` safe` and `nothrow` attributes aren't inferred for nested functions in templated functions Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: verylonglogin.reg gmail.com 12:35:09 MSK --- This code should compile: --- void g(T)() { void f(){ } f(); } void main() safe nothrow // line 7 { g!int(); // line 9 } --- main.d(9): Error: safe function 'D main' cannot call system function 'main.g!int.g' main.d(9): Error: 'main.g!int.g' is not nothrow main.d(7): Error: function 'D main' is nothrow yet may throw --- E.g. `std.algorithm.countUntil` isn't `nothrow` because of this as it uses nested `pred2`. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 05 2014
https://d.puremagic.com/issues/show_bug.cgi?id=11866 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE *** This issue has been marked as a duplicate of issue 10329 *** -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 05 2014